Movies.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:338k
源码类别:

多媒体编程

开发平台:

Visual C++

  1.                                  long                   frameDiffSampleNum,
  2.                                  long *                 syncSampleNum)                      THREEWORDINLINE(0x303C, 0x0122, 0xAAAA);
  3. /*************************
  4. * Editing Routines
  5. **************************/
  6. EXTERN_API( OSErr )
  7. InsertMediaIntoTrack            (Track                  theTrack,
  8.                                  TimeValue              trackStart,
  9.                                  TimeValue              mediaTime,
  10.                                  TimeValue              mediaDuration,
  11.                                  Fixed                  mediaRate)                          THREEWORDINLINE(0x303C, 0x0183, 0xAAAA);
  12. EXTERN_API( OSErr )
  13. InsertTrackSegment              (Track                  srcTrack,
  14.                                  Track                  dstTrack,
  15.                                  TimeValue              srcIn,
  16.                                  TimeValue              srcDuration,
  17.                                  TimeValue              dstIn)                              THREEWORDINLINE(0x303C, 0x0085, 0xAAAA);
  18. EXTERN_API( OSErr )
  19. InsertMovieSegment              (Movie                  srcMovie,
  20.                                  Movie                  dstMovie,
  21.                                  TimeValue              srcIn,
  22.                                  TimeValue              srcDuration,
  23.                                  TimeValue              dstIn)                              THREEWORDINLINE(0x303C, 0x0086, 0xAAAA);
  24. EXTERN_API( OSErr )
  25. InsertEmptyTrackSegment         (Track                  dstTrack,
  26.                                  TimeValue              dstIn,
  27.                                  TimeValue              dstDuration)                        THREEWORDINLINE(0x303C, 0x0087, 0xAAAA);
  28. EXTERN_API( OSErr )
  29. InsertEmptyMovieSegment         (Movie                  dstMovie,
  30.                                  TimeValue              dstIn,
  31.                                  TimeValue              dstDuration)                        THREEWORDINLINE(0x303C, 0x0088, 0xAAAA);
  32. EXTERN_API( OSErr )
  33. DeleteTrackSegment              (Track                  theTrack,
  34.                                  TimeValue              startTime,
  35.                                  TimeValue              duration)                           THREEWORDINLINE(0x303C, 0x0089, 0xAAAA);
  36. EXTERN_API( OSErr )
  37. DeleteMovieSegment              (Movie                  theMovie,
  38.                                  TimeValue              startTime,
  39.                                  TimeValue              duration)                           THREEWORDINLINE(0x303C, 0x008A, 0xAAAA);
  40. EXTERN_API( OSErr )
  41. ScaleTrackSegment               (Track                  theTrack,
  42.                                  TimeValue              startTime,
  43.                                  TimeValue              oldDuration,
  44.                                  TimeValue              newDuration)                        THREEWORDINLINE(0x303C, 0x008B, 0xAAAA);
  45. EXTERN_API( OSErr )
  46. ScaleMovieSegment               (Movie                  theMovie,
  47.                                  TimeValue              startTime,
  48.                                  TimeValue              oldDuration,
  49.                                  TimeValue              newDuration)                        THREEWORDINLINE(0x303C, 0x008C, 0xAAAA);
  50. /*************************
  51. * Hi-level Editing Routines
  52. **************************/
  53. EXTERN_API( Movie )
  54. CutMovieSelection               (Movie                  theMovie)                           THREEWORDINLINE(0x303C, 0x008D, 0xAAAA);
  55. EXTERN_API( Movie )
  56. CopyMovieSelection              (Movie                  theMovie)                           THREEWORDINLINE(0x303C, 0x008E, 0xAAAA);
  57. EXTERN_API( void )
  58. PasteMovieSelection             (Movie                  theMovie,
  59.                                  Movie                  src)                                THREEWORDINLINE(0x303C, 0x008F, 0xAAAA);
  60. EXTERN_API( void )
  61. AddMovieSelection               (Movie                  theMovie,
  62.                                  Movie                  src)                                THREEWORDINLINE(0x303C, 0x0152, 0xAAAA);
  63. EXTERN_API( void )
  64. ClearMovieSelection             (Movie                  theMovie)                           THREEWORDINLINE(0x303C, 0x00E1, 0xAAAA);
  65. EXTERN_API( OSErr )
  66. PasteHandleIntoMovie            (Handle                 h,
  67.                                  OSType                 handleType,
  68.                                  Movie                  theMovie,
  69.                                  long                   flags,
  70.                                  ComponentInstance      userComp)                           THREEWORDINLINE(0x303C, 0x00CB, 0xAAAA);
  71. EXTERN_API( OSErr )
  72. PutMovieIntoTypedHandle         (Movie                  theMovie,
  73.                                  Track                  targetTrack,
  74.                                  OSType                 handleType,
  75.                                  Handle                 publicMovie,
  76.                                  TimeValue              start,
  77.                                  TimeValue              dur,
  78.                                  long                   flags,
  79.                                  ComponentInstance      userComp)                           THREEWORDINLINE(0x303C, 0x01CD, 0xAAAA);
  80. EXTERN_API( Component )
  81. IsScrapMovie                    (Track                  targetTrack)                        THREEWORDINLINE(0x303C, 0x00CC, 0xAAAA);
  82. /*************************
  83. * Middle-level Editing Routines
  84. **************************/
  85. EXTERN_API( OSErr )
  86. CopyTrackSettings               (Track                  srcTrack,
  87.                                  Track                  dstTrack)                           THREEWORDINLINE(0x303C, 0x0153, 0xAAAA);
  88. EXTERN_API( OSErr )
  89. CopyMovieSettings               (Movie                  srcMovie,
  90.                                  Movie                  dstMovie)                           THREEWORDINLINE(0x303C, 0x0154, 0xAAAA);
  91. EXTERN_API( OSErr )
  92. AddEmptyTrackToMovie            (Track                  srcTrack,
  93.                                  Movie                  dstMovie,
  94.                                  Handle                 dataRef,
  95.                                  OSType                 dataRefType,
  96.                                  Track *                dstTrack)                           TWOWORDINLINE(0x7074, 0xAAAA);
  97. enum {
  98.     kQTCloneShareSamples        = 1 << 0,
  99.     kQTCloneDontCopyEdits       = 1 << 1
  100. };
  101. EXTERN_API( OSErr )
  102. AddClonedTrackToMovie           (Track                  srcTrack,
  103.                                  Movie                  dstMovie,
  104.                                  long                   flags,
  105.                                  Track *                dstTrack)                           THREEWORDINLINE(0x303C, 0x0344, 0xAAAA);
  106. /*************************
  107. * movie & track edit state routines
  108. **************************/
  109. EXTERN_API( MovieEditState )
  110. NewMovieEditState               (Movie                  theMovie)                           THREEWORDINLINE(0x303C, 0x0104, 0xAAAA);
  111. EXTERN_API( OSErr )
  112. UseMovieEditState               (Movie                  theMovie,
  113.                                  MovieEditState         toState)                            THREEWORDINLINE(0x303C, 0x0105, 0xAAAA);
  114. EXTERN_API( OSErr )
  115. DisposeMovieEditState           (MovieEditState         state)                              THREEWORDINLINE(0x303C, 0x0106, 0xAAAA);
  116. EXTERN_API( TrackEditState )
  117. NewTrackEditState               (Track                  theTrack)                           THREEWORDINLINE(0x303C, 0x0107, 0xAAAA);
  118. EXTERN_API( OSErr )
  119. UseTrackEditState               (Track                  theTrack,
  120.                                  TrackEditState         state)                              THREEWORDINLINE(0x303C, 0x0108, 0xAAAA);
  121. EXTERN_API( OSErr )
  122. DisposeTrackEditState           (TrackEditState         state)                              THREEWORDINLINE(0x303C, 0x0109, 0xAAAA);
  123. /*************************
  124. * track reference routines
  125. **************************/
  126. EXTERN_API( OSErr )
  127. AddTrackReference               (Track                  theTrack,
  128.                                  Track                  refTrack,
  129.                                  OSType                 refType,
  130.                                  long *                 addedIndex)                         THREEWORDINLINE(0x303C, 0x01F0, 0xAAAA);
  131. EXTERN_API( OSErr )
  132. DeleteTrackReference            (Track                  theTrack,
  133.                                  OSType                 refType,
  134.                                  long                   index)                              THREEWORDINLINE(0x303C, 0x01F1, 0xAAAA);
  135. EXTERN_API( OSErr )
  136. SetTrackReference               (Track                  theTrack,
  137.                                  Track                  refTrack,
  138.                                  OSType                 refType,
  139.                                  long                   index)                              THREEWORDINLINE(0x303C, 0x01F2, 0xAAAA);
  140. EXTERN_API( Track )
  141. GetTrackReference               (Track                  theTrack,
  142.                                  OSType                 refType,
  143.                                  long                   index)                              THREEWORDINLINE(0x303C, 0x01F3, 0xAAAA);
  144. EXTERN_API( OSType )
  145. GetNextTrackReferenceType       (Track                  theTrack,
  146.                                  OSType                 refType)                            THREEWORDINLINE(0x303C, 0x01F4, 0xAAAA);
  147. EXTERN_API( long )
  148. GetTrackReferenceCount          (Track                  theTrack,
  149.                                  OSType                 refType)                            THREEWORDINLINE(0x303C, 0x01F5, 0xAAAA);
  150. /*************************
  151. * high level file conversion routines
  152. **************************/
  153. EXTERN_API( OSErr )
  154. ConvertFileToMovieFile          (const FSSpec *         inputFile,
  155.                                  const FSSpec *         outputFile,
  156.                                  OSType                 creator,
  157.                                  ScriptCode             scriptTag,
  158.                                  short *                resID,
  159.                                  long                   flags,
  160.                                  ComponentInstance      userComp,
  161.                                  MovieProgressUPP       proc,
  162.                                  long                   refCon)                             THREEWORDINLINE(0x303C, 0x01CB, 0xAAAA);
  163. EXTERN_API( OSErr )
  164. ConvertMovieToFile              (Movie                  theMovie,
  165.                                  Track                  onlyTrack,
  166.                                  FSSpec *               outputFile,
  167.                                  OSType                 fileType,
  168.                                  OSType                 creator,
  169.                                  ScriptCode             scriptTag,
  170.                                  short *                resID,
  171.                                  long                   flags,
  172.                                  ComponentInstance      userComp)                           THREEWORDINLINE(0x303C, 0x01CC, 0xAAAA);
  173. enum {
  174.     kGetMovieImporterValidateToFind = 1L << 0,
  175.     kGetMovieImporterAllowNewFile = 1L << 1,
  176.     kGetMovieImporterDontConsiderGraphicsImporters = 1L << 2,
  177.     kGetMovieImporterDontConsiderFileOnlyImporters = 1L << 6,
  178.     kGetMovieImporterAutoImportOnly = 1L << 10                  /* reject aggressive movie importers which have dontAutoFileMovieImport set*/
  179. };
  180. EXTERN_API( OSErr )
  181. GetMovieImporterForDataRef      (OSType                 dataRefType,
  182.                                  Handle                 dataRef,
  183.                                  long                   flags,
  184.                                  Component *            importer)                           THREEWORDINLINE(0x303C, 0x02C7, 0xAAAA);
  185. enum {
  186.     kQTGetMIMETypeInfoIsQuickTimeMovieType = FOUR_CHAR_CODE('moov'), /* info is a pointer to a Boolean*/
  187.     kQTGetMIMETypeInfoIsUnhelpfulType = FOUR_CHAR_CODE('dumb')  /* info is a pointer to a Boolean*/
  188. };
  189. EXTERN_API( OSErr )
  190. QTGetMIMETypeInfo               (const char *           mimeStringStart,
  191.                                  short                  mimeStringLength,
  192.                                  OSType                 infoSelector,
  193.                                  void *                 infoDataPtr,
  194.                                  long *                 infoDataSize)                       THREEWORDINLINE(0x303C, 0x036A, 0xAAAA);
  195. /*************************
  196. * Movie Timebase Conversion Routines
  197. **************************/
  198. EXTERN_API( TimeValue )
  199. TrackTimeToMediaTime            (TimeValue              value,
  200.                                  Track                  theTrack)                           THREEWORDINLINE(0x303C, 0x0096, 0xAAAA);
  201. EXTERN_API( Fixed )
  202. GetTrackEditRate                (Track                  theTrack,
  203.                                  TimeValue              atTime)                             THREEWORDINLINE(0x303C, 0x0123, 0xAAAA);
  204. /*************************
  205. * Miscellaneous Routines
  206. **************************/
  207. EXTERN_API( long )
  208. GetMovieDataSize                (Movie                  theMovie,
  209.                                  TimeValue              startTime,
  210.                                  TimeValue              duration)                           THREEWORDINLINE(0x303C, 0x0098, 0xAAAA);
  211. EXTERN_API( OSErr )
  212. GetMovieDataSize64              (Movie                  theMovie,
  213.                                  TimeValue              startTime,
  214.                                  TimeValue              duration,
  215.                                  wide *                 dataSize)                           THREEWORDINLINE(0x303C, 0x02EB, 0xAAAA);
  216. EXTERN_API( long )
  217. GetTrackDataSize                (Track                  theTrack,
  218.                                  TimeValue              startTime,
  219.                                  TimeValue              duration)                           THREEWORDINLINE(0x303C, 0x0149, 0xAAAA);
  220. EXTERN_API( OSErr )
  221. GetTrackDataSize64              (Track                  theTrack,
  222.                                  TimeValue              startTime,
  223.                                  TimeValue              duration,
  224.                                  wide *                 dataSize)                           THREEWORDINLINE(0x303C, 0x02EC, 0xAAAA);
  225. EXTERN_API( long )
  226. GetMediaDataSize                (Media                  theMedia,
  227.                                  TimeValue              startTime,
  228.                                  TimeValue              duration)                           THREEWORDINLINE(0x303C, 0x0099, 0xAAAA);
  229. EXTERN_API( OSErr )
  230. GetMediaDataSize64              (Media                  theMedia,
  231.                                  TimeValue              startTime,
  232.                                  TimeValue              duration,
  233.                                  wide *                 dataSize)                           THREEWORDINLINE(0x303C, 0x02ED, 0xAAAA);
  234. EXTERN_API( Boolean )
  235. PtInMovie                       (Movie                  theMovie,
  236.                                  Point                  pt)                                 THREEWORDINLINE(0x303C, 0x009A, 0xAAAA);
  237. EXTERN_API( Boolean )
  238. PtInTrack                       (Track                  theTrack,
  239.                                  Point                  pt)                                 THREEWORDINLINE(0x303C, 0x009B, 0xAAAA);
  240. /*************************
  241. * Group Selection Routines
  242. **************************/
  243. EXTERN_API( void )
  244. SetMovieLanguage                (Movie                  theMovie,
  245.                                  long                   language)                           THREEWORDINLINE(0x303C, 0x009C, 0xAAAA);
  246. /*************************
  247. * User Data
  248. **************************/
  249. EXTERN_API( OSErr )
  250. GetUserData                     (UserData               theUserData,
  251.                                  Handle                 data,
  252.                                  OSType                 udType,
  253.                                  long                   index)                              THREEWORDINLINE(0x303C, 0x009E, 0xAAAA);
  254. EXTERN_API( OSErr )
  255. AddUserData                     (UserData               theUserData,
  256.                                  Handle                 data,
  257.                                  OSType                 udType)                             THREEWORDINLINE(0x303C, 0x009F, 0xAAAA);
  258. EXTERN_API( OSErr )
  259. RemoveUserData                  (UserData               theUserData,
  260.                                  OSType                 udType,
  261.                                  long                   index)                              THREEWORDINLINE(0x303C, 0x00A0, 0xAAAA);
  262. EXTERN_API( short )
  263. CountUserDataType               (UserData               theUserData,
  264.                                  OSType                 udType)                             THREEWORDINLINE(0x303C, 0x014B, 0xAAAA);
  265. EXTERN_API( long )
  266. GetNextUserDataType             (UserData               theUserData,
  267.                                  OSType                 udType)                             THREEWORDINLINE(0x303C, 0x01A5, 0xAAAA);
  268. EXTERN_API( OSErr )
  269. GetUserDataItem                 (UserData               theUserData,
  270.                                  void *                 data,
  271.                                  long                   size,
  272.                                  OSType                 udType,
  273.                                  long                   index)                              THREEWORDINLINE(0x303C, 0x0126, 0xAAAA);
  274. EXTERN_API( OSErr )
  275. SetUserDataItem                 (UserData               theUserData,
  276.                                  void *                 data,
  277.                                  long                   size,
  278.                                  OSType                 udType,
  279.                                  long                   index)                              THREEWORDINLINE(0x303C, 0x012E, 0xAAAA);
  280. EXTERN_API( OSErr )
  281. AddUserDataText                 (UserData               theUserData,
  282.                                  Handle                 data,
  283.                                  OSType                 udType,
  284.                                  long                   index,
  285.                                  short                  itlRegionTag)                       THREEWORDINLINE(0x303C, 0x014C, 0xAAAA);
  286. EXTERN_API( OSErr )
  287. GetUserDataText                 (UserData               theUserData,
  288.                                  Handle                 data,
  289.                                  OSType                 udType,
  290.                                  long                   index,
  291.                                  short                  itlRegionTag)                       THREEWORDINLINE(0x303C, 0x014D, 0xAAAA);
  292. EXTERN_API( OSErr )
  293. RemoveUserDataText              (UserData               theUserData,
  294.                                  OSType                 udType,
  295.                                  long                   index,
  296.                                  short                  itlRegionTag)                       THREEWORDINLINE(0x303C, 0x014E, 0xAAAA);
  297. EXTERN_API( OSErr )
  298. NewUserData                     (UserData *             theUserData)                        THREEWORDINLINE(0x303C, 0x012F, 0xAAAA);
  299. EXTERN_API( OSErr )
  300. DisposeUserData                 (UserData               theUserData)                        THREEWORDINLINE(0x303C, 0x0130, 0xAAAA);
  301. EXTERN_API( OSErr )
  302. NewUserDataFromHandle           (Handle                 h,
  303.                                  UserData *             theUserData)                        THREEWORDINLINE(0x303C, 0x0131, 0xAAAA);
  304. EXTERN_API( OSErr )
  305. PutUserDataIntoHandle           (UserData               theUserData,
  306.                                  Handle                 h)                                  THREEWORDINLINE(0x303C, 0x0132, 0xAAAA);
  307. enum {
  308.     kQTCopyUserDataReplace      = FOUR_CHAR_CODE('rplc'),       /* Delete all destination user data items and then add source user data items */
  309.     kQTCopyUserDataMerge        = FOUR_CHAR_CODE('merg')        /* Add source user data items to destination user data */
  310. };
  311. EXTERN_API( OSErr )
  312. CopyMovieUserData               (Movie                  srcMovie,
  313.                                  Movie                  dstMovie,
  314.                                  OSType                 copyRule)                           THREEWORDINLINE(0x303C, 0x0386, 0xAAAA);
  315. EXTERN_API( OSErr )
  316. CopyTrackUserData               (Track                  srcTrack,
  317.                                  Track                  dstTrack,
  318.                                  OSType                 copyRule)                           THREEWORDINLINE(0x303C, 0x0387, 0xAAAA);
  319. EXTERN_API( OSErr )
  320. CopyMediaUserData               (Media                  srcMedia,
  321.                                  Media                  dstMedia,
  322.                                  OSType                 copyRule)                           THREEWORDINLINE(0x303C, 0x0388, 0xAAAA);
  323. EXTERN_API( OSErr )
  324. CopyUserData                    (UserData               srcUserData,
  325.                                  UserData               dstUserData,
  326.                                  OSType                 copyRule)                           THREEWORDINLINE(0x303C, 0x0389, 0xAAAA);
  327. EXTERN_API( OSErr )
  328. SetMoviePropertyAtom            (Movie                  theMovie,
  329.                                  QTAtomContainer        propertyAtom)                       THREEWORDINLINE(0x303C, 0x0284, 0xAAAA);
  330. EXTERN_API( OSErr )
  331. GetMoviePropertyAtom            (Movie                  theMovie,
  332.                                  QTAtomContainer *      propertyAtom)                       THREEWORDINLINE(0x303C, 0x0285, 0xAAAA);
  333. EXTERN_API( void )
  334. GetMediaNextInterestingTime     (Media                  theMedia,
  335.                                  short                  interestingTimeFlags,
  336.                                  TimeValue              time,
  337.                                  Fixed                  rate,
  338.                                  TimeValue *            interestingTime,
  339.                                  TimeValue *            interestingDuration)                THREEWORDINLINE(0x303C, 0x016D, 0xAAAA);
  340. EXTERN_API( void )
  341. GetTrackNextInterestingTime     (Track                  theTrack,
  342.                                  short                  interestingTimeFlags,
  343.                                  TimeValue              time,
  344.                                  Fixed                  rate,
  345.                                  TimeValue *            interestingTime,
  346.                                  TimeValue *            interestingDuration)                THREEWORDINLINE(0x303C, 0x00E2, 0xAAAA);
  347. EXTERN_API( void )
  348. GetMovieNextInterestingTime     (Movie                  theMovie,
  349.                                  short                  interestingTimeFlags,
  350.                                  short                  numMediaTypes,
  351.                                  const OSType *         whichMediaTypes,
  352.                                  TimeValue              time,
  353.                                  Fixed                  rate,
  354.                                  TimeValue *            interestingTime,
  355.                                  TimeValue *            interestingDuration)                THREEWORDINLINE(0x303C, 0x010E, 0xAAAA);
  356. EXTERN_API( OSErr )
  357. CreateMovieFile                 (const FSSpec *         fileSpec,
  358.                                  OSType                 creator,
  359.                                  ScriptCode             scriptTag,
  360.                                  long                   createMovieFileFlags,
  361.                                  short *                resRefNum,
  362.                                  Movie *                newmovie)                           THREEWORDINLINE(0x303C, 0x0191, 0xAAAA);
  363. EXTERN_API( OSErr )
  364. OpenMovieFile                   (const FSSpec *         fileSpec,
  365.                                  short *                resRefNum,
  366.                                  SInt8                  permission)                         THREEWORDINLINE(0x303C, 0x0192, 0xAAAA);
  367. EXTERN_API( OSErr )
  368. CloseMovieFile                  (short                  resRefNum)                          THREEWORDINLINE(0x303C, 0x00D5, 0xAAAA);
  369. EXTERN_API( OSErr )
  370. DeleteMovieFile                 (const FSSpec *         fileSpec)                           THREEWORDINLINE(0x303C, 0x0175, 0xAAAA);
  371. EXTERN_API( OSErr )
  372. NewMovieFromFile                (Movie *                theMovie,
  373.                                  short                  resRefNum,
  374.                                  short *                resId,
  375.                                  StringPtr              resName,
  376.                                  short                  newMovieFlags,
  377.                                  Boolean *              dataRefWasChanged)                  THREEWORDINLINE(0x303C, 0x00F0, 0xAAAA);
  378. EXTERN_API( OSErr )
  379. NewMovieFromHandle              (Movie *                theMovie,
  380.                                  Handle                 h,
  381.                                  short                  newMovieFlags,
  382.                                  Boolean *              dataRefWasChanged)                  THREEWORDINLINE(0x303C, 0x00F1, 0xAAAA);
  383. EXTERN_API( OSErr )
  384. NewMovieFromDataFork            (Movie *                theMovie,
  385.                                  short                  fRefNum,
  386.                                  long                   fileOffset,
  387.                                  short                  newMovieFlags,
  388.                                  Boolean *              dataRefWasChanged)                  THREEWORDINLINE(0x303C, 0x01B3, 0xAAAA);
  389. EXTERN_API( OSErr )
  390. NewMovieFromDataFork64          (Movie *                theMovie,
  391.                                  long                   fRefNum,
  392.                                  const wide *           fileOffset,
  393.                                  short                  newMovieFlags,
  394.                                  Boolean *              dataRefWasChanged)                  THREEWORDINLINE(0x303C, 0x02EE, 0xAAAA);
  395. EXTERN_API( OSErr )
  396. NewMovieFromUserProc            (Movie *                m,
  397.                                  short                  flags,
  398.                                  Boolean *              dataRefWasChanged,
  399.                                  GetMovieUPP            getProc,
  400.                                  void *                 refCon,
  401.                                  Handle                 defaultDataRef,
  402.                                  OSType                 dataRefType)                        THREEWORDINLINE(0x303C, 0x01EC, 0xAAAA);
  403. EXTERN_API( OSErr )
  404. NewMovieFromDataRef             (Movie *                m,
  405.                                  short                  flags,
  406.                                  short *                id,
  407.                                  Handle                 dataRef,
  408.                                  OSType                 dataRefType)                        THREEWORDINLINE(0x303C, 0x0220, 0xAAAA);
  409. EXTERN_API( OSErr )
  410. NewMovieFromStorageOffset       (Movie *                theMovie,
  411.                                  DataHandler            dh,
  412.                                  const wide *           fileOffset,
  413.                                  short                  newMovieFlags,
  414.                                  Boolean *              dataRefWasChanged)                  THREEWORDINLINE(0x303C, 0x03B4, 0xAAAA);
  415. EXTERN_API( OSErr )
  416. NewMovieForDataRefFromHandle    (Movie *                theMovie,
  417.                                  Handle                 h,
  418.                                  short                  newMovieFlags,
  419.                                  Boolean *              dataRefWasChanged,
  420.                                  Handle                 dataRef,
  421.                                  OSType                 dataRefType)                        THREEWORDINLINE(0x303C, 0x0381, 0xAAAA);
  422. EXTERN_API( OSErr )
  423. AddMovieResource                (Movie                  theMovie,
  424.                                  short                  resRefNum,
  425.                                  short *                resId,
  426.                                  ConstStr255Param       resName)                            THREEWORDINLINE(0x303C, 0x00D7, 0xAAAA);
  427. EXTERN_API( OSErr )
  428. UpdateMovieResource             (Movie                  theMovie,
  429.                                  short                  resRefNum,
  430.                                  short                  resId,
  431.                                  ConstStr255Param       resName)                            THREEWORDINLINE(0x303C, 0x00D8, 0xAAAA);
  432. EXTERN_API( OSErr )
  433. RemoveMovieResource             (short                  resRefNum,
  434.                                  short                  resId)                              THREEWORDINLINE(0x303C, 0x0176, 0xAAAA);
  435. EXTERN_API( OSErr )
  436. CreateMovieStorage              (Handle                 dataRef,
  437.                                  OSType                 dataRefType,
  438.                                  OSType                 creator,
  439.                                  ScriptCode             scriptTag,
  440.                                  long                   createMovieFileFlags,
  441.                                  DataHandler *          outDataHandler,
  442.                                  Movie *                newmovie)                           THREEWORDINLINE(0x303C, 0x038A, 0xAAAA);
  443. EXTERN_API( OSErr )
  444. OpenMovieStorage                (Handle                 dataRef,
  445.                                  OSType                 dataRefType,
  446.                                  long                   flags,
  447.                                  DataHandler *          outDataHandler)                     THREEWORDINLINE(0x303C, 0x038B, 0xAAAA);
  448. EXTERN_API( OSErr )
  449. CloseMovieStorage               (DataHandler            dh)                                 THREEWORDINLINE(0x303C, 0x038C, 0xAAAA);
  450. EXTERN_API( OSErr )
  451. DeleteMovieStorage              (Handle                 dataRef,
  452.                                  OSType                 dataRefType)                        THREEWORDINLINE(0x303C, 0x038D, 0xAAAA);
  453. EXTERN_API( OSErr )
  454. AddMovieToStorage               (Movie                  theMovie,
  455.                                  DataHandler            dh)                                 THREEWORDINLINE(0x303C, 0x038F, 0xAAAA);
  456. EXTERN_API( OSErr )
  457. UpdateMovieInStorage            (Movie                  theMovie,
  458.                                  DataHandler            dh)                                 THREEWORDINLINE(0x303C, 0x0390, 0xAAAA);
  459. EXTERN_API( Boolean )
  460. HasMovieChanged                 (Movie                  theMovie)                           THREEWORDINLINE(0x303C, 0x00D9, 0xAAAA);
  461. EXTERN_API( void )
  462. ClearMovieChanged               (Movie                  theMovie)                           THREEWORDINLINE(0x303C, 0x0113, 0xAAAA);
  463. EXTERN_API( OSErr )
  464. SetMovieDefaultDataRef          (Movie                  theMovie,
  465.                                  Handle                 dataRef,
  466.                                  OSType                 dataRefType)                        THREEWORDINLINE(0x303C, 0x01C1, 0xAAAA);
  467. EXTERN_API( OSErr )
  468. GetMovieDefaultDataRef          (Movie                  theMovie,
  469.                                  Handle *               dataRef,
  470.                                  OSType *               dataRefType)                        THREEWORDINLINE(0x303C, 0x01D2, 0xAAAA);
  471. EXTERN_API( OSErr )
  472. SetMovieAnchorDataRef           (Movie                  theMovie,
  473.                                  Handle                 dataRef,
  474.                                  OSType                 dataRefType)                        THREEWORDINLINE(0x303C, 0x0315, 0xAAAA);
  475. EXTERN_API( OSErr )
  476. GetMovieAnchorDataRef           (Movie                  theMovie,
  477.                                  Handle *               dataRef,
  478.                                  OSType *               dataRefType,
  479.                                  long *                 outFlags)                           THREEWORDINLINE(0x303C, 0x0316, 0xAAAA);
  480. EXTERN_API( OSErr )
  481. SetMovieColorTable              (Movie                  theMovie,
  482.                                  CTabHandle             ctab)                               THREEWORDINLINE(0x303C, 0x0205, 0xAAAA);
  483. EXTERN_API( OSErr )
  484. GetMovieColorTable              (Movie                  theMovie,
  485.                                  CTabHandle *           ctab)                               THREEWORDINLINE(0x303C, 0x0206, 0xAAAA);
  486. EXTERN_API( void )
  487. FlattenMovie                    (Movie                  theMovie,
  488.                                  long                   movieFlattenFlags,
  489.                                  const FSSpec *         theFile,
  490.                                  OSType                 creator,
  491.                                  ScriptCode             scriptTag,
  492.                                  long                   createMovieFileFlags,
  493.                                  short *                resId,
  494.                                  ConstStr255Param       resName)                            THREEWORDINLINE(0x303C, 0x019B, 0xAAAA);
  495. EXTERN_API( Movie )
  496. FlattenMovieData                (Movie                  theMovie,
  497.                                  long                   movieFlattenFlags,
  498.                                  const FSSpec *         theFile,
  499.                                  OSType                 creator,
  500.                                  ScriptCode             scriptTag,
  501.                                  long                   createMovieFileFlags)               THREEWORDINLINE(0x303C, 0x019C, 0xAAAA);
  502. EXTERN_API( Movie )
  503. FlattenMovieDataToDataRef       (Movie                  theMovie,
  504.                                  long                   movieFlattenFlags,
  505.                                  Handle                 dataRef,
  506.                                  OSType                 dataRefType,
  507.                                  OSType                 creator,
  508.                                  ScriptCode             scriptTag,
  509.                                  long                   createMovieFileFlags)               THREEWORDINLINE(0x303C, 0x0392, 0xAAAA);
  510. EXTERN_API( void )
  511. SetMovieProgressProc            (Movie                  theMovie,
  512.                                  MovieProgressUPP       p,
  513.                                  long                   refcon)                             THREEWORDINLINE(0x303C, 0x019A, 0xAAAA);
  514. EXTERN_API( void )
  515. GetMovieProgressProc            (Movie                  theMovie,
  516.                                  MovieProgressUPP *     p,
  517.                                  long *                 refcon)                             THREEWORDINLINE(0x303C, 0x0300, 0xAAAA);
  518. EXTERN_API( OSErr )
  519. CreateShortcutMovieFile         (const FSSpec *         fileSpec,
  520.                                  OSType                 creator,
  521.                                  ScriptCode             scriptTag,
  522.                                  long                   createMovieFileFlags,
  523.                                  Handle                 targetDataRef,
  524.                                  OSType                 targetDataRefType)                  THREEWORDINLINE(0x303C, 0x02FA, 0xAAAA);
  525. EXTERN_API( OSErr )
  526. MovieSearchText                 (Movie                  theMovie,
  527.                                  Ptr                    text,
  528.                                  long                   size,
  529.                                  long                   searchFlags,
  530.                                  Track *                searchTrack,
  531.                                  TimeValue *            searchTime,
  532.                                  long *                 searchOffset)                       THREEWORDINLINE(0x303C, 0x0207, 0xAAAA);
  533. EXTERN_API( void )
  534. GetPosterBox                    (Movie                  theMovie,
  535.                                  Rect *                 boxRect)                            THREEWORDINLINE(0x303C, 0x016F, 0xAAAA);
  536. EXTERN_API( void )
  537. SetPosterBox                    (Movie                  theMovie,
  538.                                  const Rect *           boxRect)                            THREEWORDINLINE(0x303C, 0x0170, 0xAAAA);
  539. EXTERN_API( RgnHandle )
  540. GetMovieSegmentDisplayBoundsRgn (Movie                  theMovie,
  541.                                  TimeValue              time,
  542.                                  TimeValue              duration)                           THREEWORDINLINE(0x303C, 0x016C, 0xAAAA);
  543. EXTERN_API( RgnHandle )
  544. GetTrackSegmentDisplayBoundsRgn (Track                  theTrack,
  545.                                  TimeValue              time,
  546.                                  TimeValue              duration)                           THREEWORDINLINE(0x303C, 0x016B, 0xAAAA);
  547. EXTERN_API( void )
  548. SetMovieCoverProcs              (Movie                  theMovie,
  549.                                  MovieRgnCoverUPP       uncoverProc,
  550.                                  MovieRgnCoverUPP       coverProc,
  551.                                  long                   refcon)                             THREEWORDINLINE(0x303C, 0x0179, 0xAAAA);
  552. EXTERN_API( OSErr )
  553. GetMovieCoverProcs              (Movie                  theMovie,
  554.                                  MovieRgnCoverUPP *     uncoverProc,
  555.                                  MovieRgnCoverUPP *     coverProc,
  556.                                  long *                 refcon)                             THREEWORDINLINE(0x303C, 0x01DD, 0xAAAA);
  557. EXTERN_API( ComponentResult )
  558. GetTrackStatus                  (Track                  theTrack)                           THREEWORDINLINE(0x303C, 0x0172, 0xAAAA);
  559. EXTERN_API( ComponentResult )
  560. GetMovieStatus                  (Movie                  theMovie,
  561.                                  Track *                firstProblemTrack)                  THREEWORDINLINE(0x303C, 0x0173, 0xAAAA);
  562. enum {
  563.     kMovieLoadStateError        = -1L,
  564.     kMovieLoadStateLoading      = 1000,
  565.     kMovieLoadStateLoaded       = 2000,
  566.     kMovieLoadStatePlayable     = 10000,
  567.     kMovieLoadStatePlaythroughOK = 20000,
  568.     kMovieLoadStateComplete     = 100000L
  569. };
  570. EXTERN_API( long )
  571. GetMovieLoadState               (Movie                  theMovie)                           THREEWORDINLINE(0x303C, 0x0314, 0xAAAA);
  572. /* Input flags for CanQuickTimeOpenFile/DataRef */
  573. enum {
  574.     kQTDontUseDataToFindImporter = 1L << 0,
  575.     kQTDontLookForMovieImporterIfGraphicsImporterFound = 1L << 1,
  576.     kQTAllowOpeningStillImagesAsMovies = 1L << 2,
  577.     kQTAllowImportersThatWouldCreateNewFile = 1L << 3,
  578.     kQTAllowAggressiveImporters = 1L << 4                       /* eg, TEXT and PICT movie importers*/
  579. };
  580. /* Determines whether the file could be opened using a graphics importer or opened in place as a movie. */
  581. EXTERN_API( OSErr )
  582. CanQuickTimeOpenFile            (FSSpecPtr              fileSpec,
  583.                                  OSType                 fileType,
  584.                                  OSType                 fileNameExtension,
  585.                                  Boolean *              outCanOpenWithGraphicsImporter,
  586.                                  Boolean *              outCanOpenAsMovie,
  587.                                  Boolean *              outPreferGraphicsImporter,
  588.                                  UInt32                 inFlags)                            THREEWORDINLINE(0x303C, 0x033E, 0xAAAA);
  589. /* Determines whether the file could be opened using a graphics importer or opened in place as a movie. */
  590. EXTERN_API( OSErr )
  591. CanQuickTimeOpenDataRef         (Handle                 dataRef,
  592.                                  OSType                 dataRefType,
  593.                                  Boolean *              outCanOpenWithGraphicsImporter,
  594.                                  Boolean *              outCanOpenAsMovie,
  595.                                  Boolean *              outPreferGraphicsImporter,
  596.                                  UInt32                 inFlags)                            THREEWORDINLINE(0x303C, 0x033F, 0xAAAA);
  597. /****
  598.     Movie Controller support routines
  599. ****/
  600. EXTERN_API( ComponentInstance )
  601. NewMovieController              (Movie                  theMovie,
  602.                                  const Rect *           movieRect,
  603.                                  long                   someFlags)                          THREEWORDINLINE(0x303C, 0x018A, 0xAAAA);
  604. EXTERN_API( void )
  605. DisposeMovieController          (ComponentInstance      mc)                                 THREEWORDINLINE(0x303C, 0x018B, 0xAAAA);
  606. EXTERN_API( void )
  607. ShowMovieInformation            (Movie                  theMovie,
  608.                                  ModalFilterUPP         filterProc,
  609.                                  long                   refCon)                             THREEWORDINLINE(0x303C, 0x0209, 0xAAAA);
  610. /*****
  611.     Scrap routines
  612. *****/
  613. EXTERN_API( OSErr )
  614. PutMovieOnScrap                 (Movie                  theMovie,
  615.                                  long                   movieScrapFlags)                    THREEWORDINLINE(0x303C, 0x018C, 0xAAAA);
  616. EXTERN_API( Movie )
  617. NewMovieFromScrap               (long                   newMovieFlags)                      THREEWORDINLINE(0x303C, 0x018D, 0xAAAA);
  618. /*****
  619.     DataRef routines
  620. *****/
  621. EXTERN_API( OSErr )
  622. GetMediaDataRef                 (Media                  theMedia,
  623.                                  short                  index,
  624.                                  Handle *               dataRef,
  625.                                  OSType *               dataRefType,
  626.                                  long *                 dataRefAttributes)                  THREEWORDINLINE(0x303C, 0x0197, 0xAAAA);
  627. EXTERN_API( OSErr )
  628. SetMediaDataRef                 (Media                  theMedia,
  629.                                  short                  index,
  630.                                  Handle                 dataRef,
  631.                                  OSType                 dataRefType)                        THREEWORDINLINE(0x303C, 0x01C9, 0xAAAA);
  632. EXTERN_API( OSErr )
  633. SetMediaDataRefAttributes       (Media                  theMedia,
  634.                                  short                  index,
  635.                                  long                   dataRefAttributes)                  THREEWORDINLINE(0x303C, 0x01CA, 0xAAAA);
  636. EXTERN_API( OSErr )
  637. AddMediaDataRef                 (Media                  theMedia,
  638.                                  short *                index,
  639.                                  Handle                 dataRef,
  640.                                  OSType                 dataRefType)                        THREEWORDINLINE(0x303C, 0x0198, 0xAAAA);
  641. EXTERN_API( OSErr )
  642. GetMediaDataRefCount            (Media                  theMedia,
  643.                                  short *                count)                              THREEWORDINLINE(0x303C, 0x0199, 0xAAAA);
  644. EXTERN_API( OSErr )
  645. QTNewAlias                      (const FSSpec *         fss,
  646.                                  AliasHandle *          alias,
  647.                                  Boolean                minimal)                            THREEWORDINLINE(0x303C, 0x0201, 0xAAAA);
  648. /*****
  649.     Playback hint routines
  650. *****/
  651. EXTERN_API( void )
  652. SetMoviePlayHints               (Movie                  theMovie,
  653.                                  long                   flags,
  654.                                  long                   flagsMask)                          THREEWORDINLINE(0x303C, 0x01A1, 0xAAAA);
  655. EXTERN_API( void )
  656. SetMediaPlayHints               (Media                  theMedia,
  657.                                  long                   flags,
  658.                                  long                   flagsMask)                          THREEWORDINLINE(0x303C, 0x01A2, 0xAAAA);
  659. EXTERN_API( void )
  660. GetMediaPlayHints               (Media                  theMedia,
  661.                                  long *                 flags)                              THREEWORDINLINE(0x303C, 0x02CE, 0xAAAA);
  662. /*****
  663.     Load time track hints
  664. *****/
  665. enum {
  666.     preloadAlways               = 1L << 0,
  667.     preloadOnlyIfEnabled        = 1L << 1
  668. };
  669. EXTERN_API( void )
  670. SetTrackLoadSettings            (Track                  theTrack,
  671.                                  TimeValue              preloadTime,
  672.                                  TimeValue              preloadDuration,
  673.                                  long                   preloadFlags,
  674.                                  long                   defaultHints)                       THREEWORDINLINE(0x303C, 0x01E3, 0xAAAA);
  675. EXTERN_API( void )
  676. GetTrackLoadSettings            (Track                  theTrack,
  677.                                  TimeValue *            preloadTime,
  678.                                  TimeValue *            preloadDuration,
  679.                                  long *                 preloadFlags,
  680.                                  long *                 defaultHints)                       THREEWORDINLINE(0x303C, 0x01E4, 0xAAAA);
  681. /*****
  682.     Big screen TV
  683. *****/
  684. enum {
  685.     fullScreenHideCursor        = 1L << 0,
  686.     fullScreenAllowEvents       = 1L << 1,
  687.     fullScreenDontChangeMenuBar = 1L << 2,
  688.     fullScreenPreflightSize     = 1L << 3
  689. };
  690. EXTERN_API( OSErr )
  691. BeginFullScreen                 (Ptr *                  restoreState,
  692.                                  GDHandle               whichGD,
  693.                                  short *                desiredWidth,
  694.                                  short *                desiredHeight,
  695.                                  WindowRef *            newWindow,
  696.                                  RGBColor *             eraseColor,
  697.                                  long                   flags)                              THREEWORDINLINE(0x303C, 0x0233, 0xAAAA);
  698. EXTERN_API( OSErr )
  699. EndFullScreen                   (Ptr                    fullState,
  700.                                  long                   flags)                              THREEWORDINLINE(0x303C, 0x0234, 0xAAAA);
  701. /*****
  702.     Wired Actions
  703. *****/
  704. /* flags for MovieExecuteWiredActions*/
  705. enum {
  706.     movieExecuteWiredActionDontExecute = 1L << 0
  707. };
  708. EXTERN_API( OSErr )
  709. AddMovieExecuteWiredActionsProc (Movie                  theMovie,
  710.                                  MovieExecuteWiredActionsUPP  proc,
  711.                                  void *                 refCon)                             THREEWORDINLINE(0x303C, 0x0302, 0xAAAA);
  712. EXTERN_API( OSErr )
  713. RemoveMovieExecuteWiredActionsProc (Movie               theMovie,
  714.                                  MovieExecuteWiredActionsUPP  proc,
  715.                                  void *                 refCon)                             THREEWORDINLINE(0x303C, 0x0303, 0xAAAA);
  716. EXTERN_API( OSErr )
  717. MovieExecuteWiredActions        (Movie                  theMovie,
  718.                                  long                   flags,
  719.                                  QTAtomContainer        actions)                            THREEWORDINLINE(0x303C, 0x0304, 0xAAAA);
  720. /*****
  721.     Keyboard Navigation/Editable Text Field Support
  722. *****/
  723. /*
  724.    Navigation Direction Constants
  725.         for MediaNavigateTargetRefCon
  726. */
  727. enum {
  728.     kRefConNavigationNext       = 0,
  729.     kRefConNavigationPrevious   = 1
  730. };
  731. /*
  732.    Refcon Properties 
  733.         for MediaRefConGetProerty/MediaRefConSetProperty
  734. */
  735. enum {
  736.     kRefConPropertyCanHaveFocus = 1,                            /* Boolean */
  737.     kRefConPropertyHasFocus     = 2                             /* Boolean */
  738. };
  739. /* media properties*/
  740. enum {
  741.     kTrackFocusCanEditFlag      = FOUR_CHAR_CODE('kedt'),
  742.     kTrackDefaultFocusFlags     = FOUR_CHAR_CODE('kfoc'),
  743.     kTrackFocusDefaultRefcon    = FOUR_CHAR_CODE('kref')
  744. };
  745. /* focus flags*/
  746. enum {
  747.     kTrackFocusOn               = 1,
  748.     kTrackHandlesTabs           = 2                             /* this is reserved for a future release*/
  749. };
  750. /*****
  751.     Flash track properties
  752. *****/
  753. enum {
  754.     kFlashTrackPropertyAcceptAllClicks = FOUR_CHAR_CODE('clik') /* type of media property atom; data is a Boolean */
  755. };
  756. /*****
  757.     Sprite Toolbox
  758. *****/
  759. enum {
  760.     kBackgroundSpriteLayerNum   = 32767
  761. };
  762. /*  Sprite Properties*/
  763. enum {
  764.     kSpritePropertyMatrix       = 1,
  765.     kSpritePropertyImageDescription = 2,
  766.     kSpritePropertyImageDataPtr = 3,
  767.     kSpritePropertyVisible      = 4,
  768.     kSpritePropertyLayer        = 5,
  769.     kSpritePropertyGraphicsMode = 6,
  770.     kSpritePropertyImageDataSize = 7,
  771.     kSpritePropertyActionHandlingSpriteID = 8,
  772.     kSpritePropertyCanBeHitTested = 9,
  773.     kSpritePropertyImageIndex   = 100,
  774.     kSpriteTrackPropertyBackgroundColor = 101,
  775.     kSpriteTrackPropertyOffscreenBitDepth = 102,
  776.     kSpriteTrackPropertySampleFormat = 103,
  777.     kSpriteTrackPropertyScaleSpritesToScaleWorld = 104,
  778.     kSpriteTrackPropertyHasActions = 105,
  779.     kSpriteTrackPropertyVisible = 106,
  780.     kSpriteTrackPropertyQTIdleEventsFrequency = 107,
  781.     kSpriteTrackPropertyAllSpritesHitTestingMode = 108,
  782.     kSpriteTrackPropertyPreferredDepthInterpretationMode = 109,
  783.     kSpriteImagePropertyRegistrationPoint = 1000,
  784.     kSpriteImagePropertyGroupID = 1001
  785. };
  786. /* values for kSpriteTrackPropertyPreferredDepthInterpretationMode*/
  787. enum {
  788.     kSpriteTrackPreferredDepthCompatibilityMode = 0,
  789.     kSpriteTrackPreferredDepthModernMode = 1
  790. };
  791. /* values for kSpriteTrackPropertyAllSpritesHitTestingMode*/
  792. enum {
  793.     kSpriteHitTestUseSpritesOwnPropertiesMode = 0,
  794.     kSpriteHitTestTreatAllSpritesAsHitTestableMode = 1,
  795.     kSpriteHitTestTreatAllSpritesAsNotHitTestableMode = 2
  796. };
  797. /* special value for kSpriteTrackPropertyQTIdleEventsFrequency (the default)*/
  798. enum {
  799.     kNoQTIdleEvents             = -1
  800. };
  801. /* GetSpriteProperties for accessing invalid SpriteWorldRegion*/
  802. enum {
  803.     kGetSpriteWorldInvalidRegionAndLeaveIntact = -1L,
  804.     kGetSpriteWorldInvalidRegionAndThenSetEmpty = -2L
  805. };
  806. /* flagsIn for SpriteWorldIdle*/
  807. enum {
  808.     kOnlyDrawToSpriteWorld      = 1L << 0,
  809.     kSpriteWorldPreflight       = 1L << 1
  810. };
  811. /* flagsOut for SpriteWorldIdle*/
  812. enum {
  813.     kSpriteWorldDidDraw         = 1L << 0,
  814.     kSpriteWorldNeedsToDraw     = 1L << 1
  815. };
  816. /* flags for sprite track sample format*/
  817. enum {
  818.     kKeyFrameAndSingleOverride  = 1L << 1,
  819.     kKeyFrameAndAllOverrides    = 1L << 2
  820. };
  821. /* sprite world flags*/
  822. enum {
  823.     kScaleSpritesToScaleWorld   = 1L << 1,
  824.     kSpriteWorldHighQuality     = 1L << 2,
  825.     kSpriteWorldDontAutoInvalidate = 1L << 3,
  826.     kSpriteWorldInvisible       = 1L << 4,
  827.     kSpriteWorldDirtyInsteadOfFlush = 1L << 5
  828. };
  829. EXTERN_API( OSErr )
  830. NewSpriteWorld                  (SpriteWorld *          newSpriteWorld,
  831.                                  GWorldPtr              destination,
  832.                                  GWorldPtr              spriteLayer,
  833.                                  RGBColor *             backgroundColor,
  834.                                  GWorldPtr              background)                         THREEWORDINLINE(0x303C, 0x0239, 0xAAAA);
  835. EXTERN_API( void )
  836. DisposeSpriteWorld              (SpriteWorld            theSpriteWorld)                     THREEWORDINLINE(0x303C, 0x023A, 0xAAAA);
  837. EXTERN_API( OSErr )
  838. SetSpriteWorldClip              (SpriteWorld            theSpriteWorld,
  839.                                  RgnHandle              clipRgn)                            THREEWORDINLINE(0x303C, 0x023B, 0xAAAA);
  840. EXTERN_API( OSErr )
  841. SetSpriteWorldMatrix            (SpriteWorld            theSpriteWorld,
  842.                                  const MatrixRecord *   matrix)                             THREEWORDINLINE(0x303C, 0x023C, 0xAAAA);
  843. EXTERN_API( OSErr )
  844. SetSpriteWorldGraphicsMode      (SpriteWorld            theSpriteWorld,
  845.                                  long                   mode,
  846.                                  const RGBColor *       opColor)                            THREEWORDINLINE(0x303C, 0x02D9, 0xAAAA);
  847. EXTERN_API( OSErr )
  848. SpriteWorldIdle                 (SpriteWorld            theSpriteWorld,
  849.                                  long                   flagsIn,
  850.                                  long *                 flagsOut)                           THREEWORDINLINE(0x303C, 0x023D, 0xAAAA);
  851. EXTERN_API( OSErr )
  852. InvalidateSpriteWorld           (SpriteWorld            theSpriteWorld,
  853.                                  Rect *                 invalidArea)                        THREEWORDINLINE(0x303C, 0x023E, 0xAAAA);
  854. EXTERN_API( OSErr )
  855. SpriteWorldHitTest              (SpriteWorld            theSpriteWorld,
  856.                                  long                   flags,
  857.                                  Point                  loc,
  858.                                  Sprite *               spriteHit)                          THREEWORDINLINE(0x303C, 0x0246, 0xAAAA);
  859. EXTERN_API( OSErr )
  860. SpriteHitTest                   (Sprite                 theSprite,
  861.                                  long                   flags,
  862.                                  Point                  loc,
  863.                                  Boolean *              wasHit)                             THREEWORDINLINE(0x303C, 0x0247, 0xAAAA);
  864. EXTERN_API( void )
  865. DisposeAllSprites               (SpriteWorld            theSpriteWorld)                     THREEWORDINLINE(0x303C, 0x023F, 0xAAAA);
  866. EXTERN_API( OSErr )
  867. SetSpriteWorldFlags             (SpriteWorld            spriteWorld,
  868.                                  long                   flags,
  869.                                  long                   flagsMask)                          THREEWORDINLINE(0x303C, 0x02C2, 0xAAAA);
  870. EXTERN_API( OSErr )
  871. NewSprite                       (Sprite *               newSprite,
  872.                                  SpriteWorld            itsSpriteWorld,
  873.                                  ImageDescriptionHandle  idh,
  874.                                  Ptr                    imageDataPtr,
  875.                                  MatrixRecord *         matrix,
  876.                                  Boolean                visible,
  877.                                  short                  layer)                              THREEWORDINLINE(0x303C, 0x0240, 0xAAAA);
  878. EXTERN_API( void )
  879. DisposeSprite                   (Sprite                 theSprite)                          THREEWORDINLINE(0x303C, 0x0241, 0xAAAA);
  880. EXTERN_API( void )
  881. InvalidateSprite                (Sprite                 theSprite)                          THREEWORDINLINE(0x303C, 0x0242, 0xAAAA);
  882. EXTERN_API( OSErr )
  883. SetSpriteProperty               (Sprite                 theSprite,
  884.                                  long                   propertyType,
  885.                                  void *                 propertyValue)                      THREEWORDINLINE(0x303C, 0x0243, 0xAAAA);
  886. EXTERN_API( OSErr )
  887. GetSpriteProperty               (Sprite                 theSprite,
  888.                                  long                   propertyType,
  889.                                  void *                 propertyValue)                      THREEWORDINLINE(0x303C, 0x0244, 0xAAAA);
  890. /*****
  891.     QT Atom Data Support
  892. *****/
  893. enum {
  894.     kParentAtomIsContainer      = 0
  895. };
  896. /* create and dispose QTAtomContainer objects*/
  897. EXTERN_API( OSErr )
  898. QTNewAtomContainer              (QTAtomContainer *      atomData)                           THREEWORDINLINE(0x303C, 0x020C, 0xAAAA);
  899. EXTERN_API( OSErr )
  900. QTDisposeAtomContainer          (QTAtomContainer        atomData)                           THREEWORDINLINE(0x303C, 0x020D, 0xAAAA);
  901. /* locating nested atoms within QTAtomContainer container*/
  902. EXTERN_API( QTAtomType )
  903. QTGetNextChildType              (QTAtomContainer        container,
  904.                                  QTAtom                 parentAtom,
  905.                                  QTAtomType             currentChildType)                   THREEWORDINLINE(0x303C, 0x020E, 0xAAAA);
  906. EXTERN_API( short )
  907. QTCountChildrenOfType           (QTAtomContainer        container,
  908.                                  QTAtom                 parentAtom,
  909.                                  QTAtomType             childType)                          THREEWORDINLINE(0x303C, 0x020F, 0xAAAA);
  910. EXTERN_API( QTAtom )
  911. QTFindChildByIndex              (QTAtomContainer        container,
  912.                                  QTAtom                 parentAtom,
  913.                                  QTAtomType             atomType,
  914.                                  short                  index,
  915.                                  QTAtomID *             id)                                 THREEWORDINLINE(0x303C, 0x0210, 0xAAAA);
  916. EXTERN_API( QTAtom )
  917. QTFindChildByID                 (QTAtomContainer        container,
  918.                                  QTAtom                 parentAtom,
  919.                                  QTAtomType             atomType,
  920.                                  QTAtomID               id,
  921.                                  short *                index)                              THREEWORDINLINE(0x303C, 0x021D, 0xAAAA);
  922. EXTERN_API( OSErr )
  923. QTNextChildAnyType              (QTAtomContainer        container,
  924.                                  QTAtom                 parentAtom,
  925.                                  QTAtom                 currentChild,
  926.                                  QTAtom *               nextChild)                          THREEWORDINLINE(0x303C, 0x0200, 0xAAAA);
  927. /* set a leaf atom's data*/
  928. EXTERN_API( OSErr )
  929. QTSetAtomData                   (QTAtomContainer        container,
  930.                                  QTAtom                 atom,
  931.                                  long                   dataSize,
  932.                                  void *                 atomData)                           THREEWORDINLINE(0x303C, 0x0211, 0xAAAA);
  933. /* extracting data*/
  934. EXTERN_API( OSErr )
  935. QTCopyAtomDataToHandle          (QTAtomContainer        container,
  936.                                  QTAtom                 atom,
  937.                                  Handle                 targetHandle)                       THREEWORDINLINE(0x303C, 0x0212, 0xAAAA);
  938. EXTERN_API( OSErr )
  939. QTCopyAtomDataToPtr             (QTAtomContainer        container,
  940.                                  QTAtom                 atom,
  941.                                  Boolean                sizeOrLessOK,
  942.                                  long                   size,
  943.                                  void *                 targetPtr,
  944.                                  long *                 actualSize)                         THREEWORDINLINE(0x303C, 0x0213, 0xAAAA);
  945. EXTERN_API( OSErr )
  946. QTGetAtomTypeAndID              (QTAtomContainer        container,
  947.                                  QTAtom                 atom,
  948.                                  QTAtomType *           atomType,
  949.                                  QTAtomID *             id)                                 THREEWORDINLINE(0x303C, 0x0232, 0xAAAA);
  950. /* extract a copy of an atom and all of it's children, caller disposes*/
  951. EXTERN_API( OSErr )
  952. QTCopyAtom                      (QTAtomContainer        container,
  953.                                  QTAtom                 atom,
  954.                                  QTAtomContainer *      targetContainer)                    THREEWORDINLINE(0x303C, 0x0214, 0xAAAA);
  955. /* obtaining direct reference to atom data*/
  956. EXTERN_API( OSErr )
  957. QTLockContainer                 (QTAtomContainer        container)                          THREEWORDINLINE(0x303C, 0x0215, 0xAAAA);
  958. EXTERN_API( OSErr )
  959. QTGetAtomDataPtr                (QTAtomContainer        container,
  960.                                  QTAtom                 atom,
  961.                                  long *                 dataSize,
  962.                                  Ptr *                  atomData)                           THREEWORDINLINE(0x303C, 0x0216, 0xAAAA);
  963. EXTERN_API( OSErr )
  964. QTUnlockContainer               (QTAtomContainer        container)                          THREEWORDINLINE(0x303C, 0x0217, 0xAAAA);
  965. /*
  966.    building QTAtomContainer trees
  967.    creates and inserts new atom at specified index, existing atoms at or after index are moved toward end of list
  968.    used for Top-Down tree creation
  969. */
  970. EXTERN_API( OSErr )
  971. QTInsertChild                   (QTAtomContainer        container,
  972.                                  QTAtom                 parentAtom,
  973.                                  QTAtomType             atomType,
  974.                                  QTAtomID               id,
  975.                                  short                  index,
  976.                                  long                   dataSize,
  977.                                  void *                 data,
  978.                                  QTAtom *               newAtom)                            THREEWORDINLINE(0x303C, 0x0218, 0xAAAA);
  979. /* inserts children from childrenContainer as children of parentAtom*/
  980. EXTERN_API( OSErr )
  981. QTInsertChildren                (QTAtomContainer        container,
  982.                                  QTAtom                 parentAtom,
  983.                                  QTAtomContainer        childrenContainer)                  THREEWORDINLINE(0x303C, 0x0219, 0xAAAA);
  984. /* destruction*/
  985. EXTERN_API( OSErr )
  986. QTRemoveAtom                    (QTAtomContainer        container,
  987.                                  QTAtom                 atom)                               THREEWORDINLINE(0x303C, 0x021A, 0xAAAA);
  988. EXTERN_API( OSErr )
  989. QTRemoveChildren                (QTAtomContainer        container,
  990.                                  QTAtom                 atom)                               THREEWORDINLINE(0x303C, 0x021B, 0xAAAA);
  991. /* replacement must be same type as target*/
  992. EXTERN_API( OSErr )
  993. QTReplaceAtom                   (QTAtomContainer        targetContainer,
  994.                                  QTAtom                 targetAtom,
  995.                                  QTAtomContainer        replacementContainer,
  996.                                  QTAtom                 replacementAtom)                    THREEWORDINLINE(0x303C, 0x021C, 0xAAAA);
  997. EXTERN_API( OSErr )
  998. QTSwapAtoms                     (QTAtomContainer        container,
  999.                                  QTAtom                 atom1,
  1000.                                  QTAtom                 atom2)                              THREEWORDINLINE(0x303C, 0x01FF, 0xAAAA);
  1001. EXTERN_API( OSErr )
  1002. QTSetAtomID                     (QTAtomContainer        container,
  1003.                                  QTAtom                 atom,
  1004.                                  QTAtomID               newID)                              THREEWORDINLINE(0x303C, 0x0231, 0xAAAA);
  1005. EXTERN_API( QTAtom )
  1006. QTGetAtomParent                 (QTAtomContainer        container,
  1007.                                  QTAtom                 childAtom)                          THREEWORDINLINE(0x303C, 0x02EF, 0xAAAA);
  1008. EXTERN_API( OSErr )
  1009. SetMediaPropertyAtom            (Media                  theMedia,
  1010.                                  QTAtomContainer        propertyAtom)                       THREEWORDINLINE(0x303C, 0x022E, 0xAAAA);
  1011. EXTERN_API( OSErr )
  1012. GetMediaPropertyAtom            (Media                  theMedia,
  1013.                                  QTAtomContainer *      propertyAtom)                       THREEWORDINLINE(0x303C, 0x022F, 0xAAAA);
  1014. /*****
  1015.     Tween Support
  1016. *****/
  1017. typedef struct TweenRecord              TweenRecord;
  1018. typedef CALLBACK_API( ComponentResult , TweenerDataProcPtr )(TweenRecord *tr, void *tweenData, long tweenDataSize, long dataDescriptionSeed, Handle dataDescription, ICMCompletionProcRecordPtr asyncCompletionProc, UniversalProcPtr transferProc, void *refCon);
  1019. typedef STACK_UPP_TYPE(TweenerDataProcPtr)                      TweenerDataUPP;
  1020. struct TweenRecord {
  1021.     long                            version;
  1022.     QTAtomContainer                 container;
  1023.     QTAtom                          tweenAtom;
  1024.     QTAtom                          dataAtom;
  1025.     Fixed                           percent;
  1026.     TweenerDataUPP                  dataProc;
  1027.     void *                          private1;
  1028.     void *                          private2;
  1029. };
  1030. struct TweenV1Record {
  1031.     long                            version;
  1032.     QTAtomContainer                 container;
  1033.     QTAtom                          tweenAtom;
  1034.     QTAtom                          dataAtom;
  1035.     Fixed                           percent;
  1036.     TweenerDataUPP                  dataProc;
  1037.     void *                          private1;
  1038.     void *                          private2;
  1039.     Fract                           fractPercent;
  1040. };
  1041. typedef struct TweenV1Record            TweenV1Record;
  1042. enum {
  1043.     kTweenRecordNoFlags         = 0,
  1044.     kTweenRecordIsAtInterruptTime = 0x00000001
  1045. };
  1046. struct TweenV2Record {
  1047.     long                            version;
  1048.     QTAtomContainer                 container;
  1049.     QTAtom                          tweenAtom;
  1050.     QTAtom                          dataAtom;
  1051.     Fixed                           percent;
  1052.     TweenerDataUPP                  dataProc;
  1053.     void *                          private1;
  1054.     void *                          private2;
  1055.     Fract                           fractPercent;
  1056.     long                            flags;
  1057. };
  1058. typedef struct TweenV2Record            TweenV2Record;
  1059. EXTERN_API( OSErr )
  1060. QTNewTween                      (QTTweener *            tween,
  1061.                                  QTAtomContainer        container,
  1062.                                  QTAtom                 tweenAtom,
  1063.                                  TimeValue              maxTime)                            THREEWORDINLINE(0x303C, 0x029D, 0xAAAA);
  1064. EXTERN_API( OSErr )
  1065. QTDisposeTween                  (QTTweener              tween)                              THREEWORDINLINE(0x303C, 0x029F, 0xAAAA);
  1066. EXTERN_API( OSErr )
  1067. QTDoTween                       (QTTweener              tween,
  1068.                                  TimeValue              atTime,
  1069.                                  Handle                 result,
  1070.                                  long *                 resultSize,
  1071.                                  TweenerDataUPP         tweenDataProc,
  1072.                                  void *                 tweenDataRefCon)                    THREEWORDINLINE(0x303C, 0x029E, 0xAAAA);
  1073. /*
  1074.     QTDoTweenPtr is an interrupt-safe version of QTDoTween.  It has the following limitations:
  1075.      - not all tween types support this call (those which must allocated memory), in which case they return codecUnimpErr.
  1076.      - the QTAtomContainer used for the tween must be locked
  1077.      - the dataSize must be large enough to contain the result
  1078.      - this call is not supported for sequence tweens, use interpolation tweens instead
  1079. */
  1080. EXTERN_API( OSErr )
  1081. QTDoTweenPtr                    (QTTweener              tween,
  1082.                                  TimeValue              atTime,
  1083.                                  Ptr                    result,
  1084.                                  long                   resultSize)                         THREEWORDINLINE(0x303C, 0x036E, 0xAAAA);
  1085. /*****
  1086.     Sound Description Manipulations
  1087. *****/
  1088. EXTERN_API( OSErr )
  1089. AddSoundDescriptionExtension    (SoundDescriptionHandle  desc,
  1090.                                  Handle                 extension,
  1091.                                  OSType                 idType)                             THREEWORDINLINE(0x303C, 0x02CF, 0xAAAA);
  1092. EXTERN_API( OSErr )
  1093. GetSoundDescriptionExtension    (SoundDescriptionHandle  desc,
  1094.                                  Handle *               extension,
  1095.                                  OSType                 idType)                             THREEWORDINLINE(0x303C, 0x02D0, 0xAAAA);
  1096. EXTERN_API( OSErr )
  1097. RemoveSoundDescriptionExtension (SoundDescriptionHandle  desc,
  1098.                                  OSType                 idType)                             THREEWORDINLINE(0x303C, 0x02D1, 0xAAAA);
  1099. /*****
  1100.     Preferences
  1101. *****/
  1102. EXTERN_API( OSErr )
  1103. GetQuickTimePreference          (OSType                 preferenceType,
  1104.                                  QTAtomContainer *      preferenceAtom)                     THREEWORDINLINE(0x303C, 0x02D4, 0xAAAA);
  1105. EXTERN_API( OSErr )
  1106. SetQuickTimePreference          (OSType                 preferenceType,
  1107.                                  QTAtomContainer        preferenceAtom)                     THREEWORDINLINE(0x303C, 0x02D5, 0xAAAA);
  1108. /*****
  1109.     Effects and dialog Support
  1110. *****/
  1111. /* atom types for entries in the effects list*/
  1112. enum {
  1113.     kEffectNameAtom             = FOUR_CHAR_CODE('name'),       /* name of effect */
  1114.     kEffectTypeAtom             = FOUR_CHAR_CODE('type'),       /* codec sub-type for effect */
  1115.     kEffectManufacturerAtom     = FOUR_CHAR_CODE('manu')        /* codec manufacturer for effect */
  1116. };
  1117. struct QTParamPreviewRecord {
  1118.     long                            sourceID;                   /* 1 based source identifier*/
  1119.     PicHandle                       sourcePicture;              /* picture for preview, must not dispose until dialog is disposed*/
  1120. };
  1121. typedef struct QTParamPreviewRecord     QTParamPreviewRecord;
  1122. typedef QTParamPreviewRecord *          QTParamPreviewPtr;
  1123. struct QTParamDialogEventRecord {
  1124.     EventRecord *                   theEvent;                   /* Event received by the dialog */
  1125.     DialogRef                       whichDialog;                /* dialog that event was directed towards */
  1126.     short                           itemHit;                    /* dialog item which was hit */
  1127. };
  1128. typedef struct QTParamDialogEventRecord QTParamDialogEventRecord;
  1129. typedef QTParamDialogEventRecord *      QTParamDialogEventPtr;
  1130. struct QTParamFetchPreviewRecord {
  1131.     GWorldPtr                       theWorld;                   /* the world into which to draw the preview */
  1132.     Fixed                           percentage;                 /* frame percentage (from 0.0 - 1.0) to be drawn */
  1133. };
  1134. typedef struct QTParamFetchPreviewRecord QTParamFetchPreviewRecord;
  1135. typedef QTParamFetchPreviewRecord *     QTParamFetchPreviewPtr;
  1136. enum {
  1137.     pdActionConfirmDialog       = 1,                            /* no param*/
  1138.     pdActionSetAppleMenu        = 2,                            /* param is MenuRef*/
  1139.     pdActionSetEditMenu         = 3,                            /* param is MenuRef*/
  1140.     pdActionGetDialogValues     = 4,                            /* param is QTAtomContainer*/
  1141.     pdActionSetPreviewUserItem  = 5,                            /* param is long*/
  1142.     pdActionSetPreviewPicture   = 6,                            /* param is QTParamPreviewPtr;*/
  1143.     pdActionSetColorPickerEventProc = 7,                        /* param is UserEventUPP*/
  1144.     pdActionSetDialogTitle      = 8,                            /* param is StringPtr */
  1145.     pdActionGetSubPanelMenu     = 9,                            /* param is MenuRef* */
  1146.     pdActionActivateSubPanel    = 10,                           /* param is long */
  1147.     pdActionConductStopAlert    = 11,                           /* param is StringPtr */
  1148.     pdActionModelessCallback    = 12,                           /* param is QTParamDialogEventPtr */
  1149.     pdActionFetchPreview        = 13,                           /* param is QTParamFetchPreviewPtr */
  1150.     pdActionSetDialogSettings   = 14,                           /* param is QTAtomContainer */
  1151.     pdActionGetDialogSettings   = 15,                           /* param is QTAtomContainer */
  1152.     pdActionGetNextSample       = 16,                           /* param is QTAtomContainer with effect sample to change - createdDialog may be NIL */
  1153.     pdActionGetPreviousSample   = 17,                           /* param is QTAtomContainer with effect sample to change - createdDialog may be NIL */
  1154.     pdActionCompactSample       = 18,                           /* param is QTAtomContainer with effect sample to compact, - createdDialog may be NIL */
  1155.     pdActionSetEditCallout      = 19,                           /* param is QTParamPreviewCalloutPtr, can be NIL */
  1156.     pdActionSetSampleTime       = 20,                           /* param is QTParamSampleTimePtr, can be NIL */
  1157.     pdActionDoEditCommand       = 21,                           /* param is long with menu command (ie, mcMenuCut etc) */
  1158.     pdActionGetSubPanelMenuValue = 22,                          /* param is long and returns current sub-panel value selected by the effect */
  1159.                                                                 /* Action codes and typedefs used for custom controls within effects */
  1160.     pdActionCustomNewControl    = 23,                           /* param is QTCustomControlNewPtr */
  1161.     pdActionCustomDisposeControl = 24,                          /* param is QTCustomControlNewPtr */
  1162.     pdActionCustomPositionControl = 25,                         /* param is QTCustomControlPositionControlPtr */
  1163.     pdActionCustomShowHideControl = 26,                         /* param is QTCustomControlShowHideControlPtr */
  1164.     pdActionCustomHandleEvent   = 27,                           /* param is QTCustomControlHandleEventPtr */
  1165.     pdActionCustomSetFocus      = 28,                           /* param is QTCustomControlSetFocusPtr */
  1166.     pdActionCustomSetEditMenu   = 29,                           /* param is QTCustomControlSetEditMenuPtr */
  1167.     pdActionCustomSetPreviewPicture = 30,                       /* param is QTCustomControlSetPreviewPicturePtr */
  1168.     pdActionCustomSetEditCallout = 31,                          /* param is QTCustomControlSetEditCalloutPtr */
  1169.     pdActionCustomGetEnableValue = 32,                          /* param is QTCustomControlGetEnableValuePtr */
  1170.     pdActionCustomSetSampleTime = 33,                           /* param is QTCustomControlSetSampleTimePtr */
  1171.     pdActionCustomGetValue      = 34,                           /* param is QTCustomControlGetValue */
  1172.     pdActionCustomDoEditCommand = 35                            /* param is QTCustomControlDoEditCommand */
  1173. };
  1174. /* Sample Time information */
  1175. enum {
  1176.     pdSampleTimeDisplayOptionsNone = 0x00000000
  1177. };
  1178. struct QTParamSampleTimeRecord {
  1179.     long                            displayOptions;
  1180.     TimeRecord                      sampleStartTime;
  1181.     TimeValue                       sampleDuration;
  1182.     long                            framesPerSecond;            /* if 0, will cause revert to seconds display*/
  1183. };
  1184. typedef struct QTParamSampleTimeRecord  QTParamSampleTimeRecord;
  1185. typedef QTParamSampleTimeRecord *       QTParamSampleTimePtr;
  1186. /* Preview change callout information */
  1187. struct QTParamPreviewCalloutRecord {
  1188.     MoviePreviewCallOutUPP          calloutProc;                /* called when user makes editing changes to dialog.  May be NIL.  You should return true from your function. */
  1189.     long                            refCon;                     /* passed to the callout procedure */
  1190. };
  1191. typedef struct QTParamPreviewCalloutRecord QTParamPreviewCalloutRecord;
  1192. typedef QTParamPreviewCalloutRecord *   QTParamPreviewCalloutPtr;
  1193. typedef long                            QTParameterDialogOptions;
  1194. /* ------- CUSTOM EFFECT CONTROLS*/
  1195. /*
  1196.     Effects may choose to implement custom controls to allow the user to more easily edit complex parameters
  1197.     that are ill-served by simple sliders or type in boxes.   Effects may allow a custom control for either
  1198.     a single parameter, or for a group of parameters.
  1199.     
  1200.     Parameter(s) for a custom control must still be data types defined by the standard set, or for
  1201.     complex records of data, must be defined within a group as individual parameters made up from base
  1202.     data types (for example, a point is a group containing two Fixed point numbers).  
  1203.     This is to allow applications that do not wish to use the custom control for the effect to set values themselves.
  1204.     
  1205.     Effects should be aware that these custom controls may be deployed by the application in either a dialog or
  1206.     a window, with application defined background colors or patterns, along with application defined font
  1207.     characteristics for the window.
  1208.     
  1209.     It is recommended that effects implement custom controls only when needed, and that custom controls be used
  1210.     for specific types of parameters (ie, point, rectangle, polygon, path) rather than the entire user interface
  1211.     for the effect.  Effects may choose to implement multiple custom controls which combine with standard controls
  1212.     to present the total user interface.  For effects which have very complex user interfaces not well suited for 
  1213.     inclusion within a single window, it is recommended to use kParameterImageIsPreset -- which allows the effect to
  1214.     have an external editing application for parameters which may then be set within the standard UI via the open file 
  1215.     dialog or drag and drop.  The Lens Flare effect's "Flare Type" is an example of such a preset.
  1216.     For parameters that use a custom control to control a single parameter value, a new behavior
  1217.     flag has been added (kCustomControl), and the behavior for the parameter should be kParameterItemControl.
  1218.     
  1219.     For parameters that are groups, the same flag (kCustomControl) should be used, and the behavior
  1220.     should be kParameterItemGroupDivider.  Groups with the kCustomControl bit set will be implemented
  1221.     by calling the custom control for that group -- the parameters within that group will not be processed
  1222.     in the normal manner.
  1223.     
  1224.     In both cases, the new customType and customID fields of the behavior must be filled in.  These are 
  1225.     used in order to allow your custom control to determine which parameter is being edited in the case
  1226.     where the custom control is used for the editing of multiple parameters.  These values are passed into
  1227.     the pdActionCustomNewControl call.  Since the custom control mechanism is also used by QuickTime's
  1228.     default effect dialogs, you should be prepared to pass onto the base effect any pdActionCustomNewControl
  1229.     calls for type/id pairs that you do not handle yourself.  When  pdActionCustomNewControl is called
  1230.     for controls of types handled by QuickTime, customType is kParameterAtomTypeAndID and customID is
  1231.     the ID of the parameter atom. 
  1232. */
  1233. /*
  1234.     pdActionCustomNewControlControl is called by application to create a new custom control or set of controls
  1235.     for an effect parameter.  When pdActionCustomNewControl is called, the effect should perform any
  1236.     basic allocation it needs for storage and return the result in storage. The options parameter tells
  1237.     the control if the application wishes to support interpolated, optionally interpolated, or a single
  1238.     value parameter.
  1239.     
  1240.     Since pdActionCustomNewControlControl may be called upon your effect for other items within the
  1241.     dialog, it is recommended that your effect have an easy way to determine which controls it implements:
  1242.      a) by having storage be a pointer with an OSType at the begining to mark controls
  1243.         implemented by your code.
  1244.      - or -
  1245.      b) keeping track in your component globals those custom controls which you have created.
  1246.     
  1247.     When pdActionCustomDisposeControl is called any allocation done by the control should be disposed. In addition, 
  1248.     pdActionCustomDisposeControl is the last chance the control has to commit any user changes into the sample.
  1249.     Controls which implement type in fields typically need to commit any final user edits at this time.
  1250. */
  1251. struct QTCustomControlNewRecord {
  1252.     void *                          storage;                    /* storage allocated/disposed by the control*/
  1253.     QTParameterDialogOptions        options;                    /* options used to control interpolation/not*/
  1254.     QTAtomContainer                 sample;                     /* sample that holds the data to be edited*/
  1255.     long                            customType;                 /* custom type and ID specified by effect for creation of this control*/
  1256.     long                            customID;
  1257. };
  1258. typedef struct QTCustomControlNewRecord QTCustomControlNewRecord;
  1259. typedef QTCustomControlNewRecord *      QTCustomControlNewPtr;
  1260. /*
  1261.     pdActionCustomPositionControl is called by the application to position the control within a window or dialog.
  1262.     The control should determine if it will fit in the alloted area and position itself there.  It should also
  1263.     return the space taken up by the control.   Note you are free to implement controls which are variable in size depending upon
  1264.     which parameter you are editing.  You need not scale your control to the requested size.  If the area presented to your
  1265.     control is too small, set didFit to false.  You should still return in used the size you would have liked to use for
  1266.     the control.   The application will then try again with a new size.  Note that all
  1267.     controls must be able to fit within a minimum of 300 by 250 pixels.
  1268.     
  1269.     Custom controls that draw text should make note of the text font, size, and style at this time in order
  1270.     to properly display within application windows.
  1271.     
  1272.     Note that the default state for the control is hidden.  You will receive a pdActionCustomShowHideControl
  1273.     in order to enable your control.  You should not draw your control in response to pdActionCustomPositionControl.
  1274. */
  1275. struct QTCustomControlPositionControlRecord {
  1276.     void *                          storage;                    /* storage for the control*/
  1277.     WindowPtr                       window;                     /* window to be used by the control*/
  1278.     Rect                            location;                   /* location within the window the control may use*/
  1279.     Rect                            used;                       /* returned by the control to indicate size it actually used*/
  1280.     Boolean                         didFit;                     /* did the control fit in the specified area?*/
  1281.     Boolean                         pad[3];
  1282. };
  1283. typedef struct QTCustomControlPositionControlRecord QTCustomControlPositionControlRecord;
  1284. typedef QTCustomControlPositionControlRecord * QTCustomControlPositionControlPtr;
  1285. /*
  1286.     pdActionCustomShowHideControl is called when the application wishes to enable/disable your control, or 
  1287.     completely disable drawing of the control
  1288.     
  1289.     Your control should make note of the new state (if different from the last) and perform an InvalRect()
  1290.     on your drawing area, or you may draw your control's initial state in the case of show.  You should not
  1291.     attempt to erase your control as the result of a hide -- instead call InvalRect() and allow the application
  1292.     to process the resulting event as appropriate.
  1293. */
  1294. struct QTCustomControlShowHideControlRecord {
  1295.     void *                          storage;                    /* storage for the control*/
  1296.     Boolean                         show;                       /* display the control?*/
  1297.     Boolean                         enable;                     /* enable the control (ie, black vs gray display)*/
  1298.     Boolean                         pad[2];
  1299. };
  1300. typedef struct QTCustomControlShowHideControlRecord QTCustomControlShowHideControlRecord;
  1301. typedef QTCustomControlShowHideControlRecord * QTCustomControlShowHideControlPtr;
  1302. /*
  1303.     pdActionCustomHandleEvent is called to allow your custom control to process events.
  1304.     
  1305.     Typical controls handle the following events:
  1306.         - activate - to draw your control in normal/gray mode
  1307.         - update - to draw your control
  1308.         - mouseDown - to handle clicks
  1309.         - keyDown - to handle typing when you have focus
  1310.         - idle - to perform idle drawing (if applicable)
  1311.     If your control handles the entire event, set didProcess to true.  If
  1312.     you handled the event, but other controls still need the event, set didProcess to false.
  1313.     
  1314.     If your control supports the concept of focus for the purposes of typing (such as by having
  1315.     a type-in box for the parameter) then you set the tookFocus Boolean as part of your processing
  1316.     of the event.  It is assumed that your control will draw the appropriate focus UI as a result, and
  1317.     the calling application will disable any focus drawing within the remainder of the UI.
  1318.     By default, custom controls are not given idle time.  If you need idle time, set needIdle to true
  1319.     in response to the even that causes you to need idle (typically the taking of focus, or the first draw).
  1320.     Your control will continue to be given idle events until you set needIdle to false in response to
  1321.     a nullEvent.
  1322. */
  1323. struct QTCustomControlHandleEventRecord {
  1324.     void *                          storage;                    /* storage for the control*/
  1325.     EventRecord *                   pEvent;                     /* event to process*/
  1326.     Boolean                         didProcess;                 /* did we process entire event?*/
  1327.     Boolean                         tookFocus;                  /* did we take focus as a result of this event (typically mouseDowns)*/
  1328.     Boolean                         needIdle;                   /* does this control need idle events?*/
  1329.     Boolean                         didEdit;                    /* did we edit the samples?*/
  1330. };
  1331. typedef struct QTCustomControlHandleEventRecord QTCustomControlHandleEventRecord;
  1332. typedef QTCustomControlHandleEventRecord * QTCustomControlHandleEventPtr;
  1333. /*
  1334.     pdActionCustomSetFocus is called in order to set or advance the current focus of the user interface, typically
  1335.     because the user has pressed the tab or shift-tab keys, or because the user clicked within the area defined by
  1336.     your control.
  1337.     
  1338.     Your control will be called with pdActionFocusFirst,  pdActionFocusLast, or pdActionFocusOff to set or clear focus on your
  1339.     control.  Your control will be called with pdActionFocusForward or pdActionFocusBackward to cycle
  1340.     focus within your control (if your control has multiple focus).  If your control does not support focus,
  1341.     or the focus request results in focus moving beyond your supported range, return pdActionFocusOff in
  1342.     the focus parameter.  Otherwise, return the focus that you set.
  1343.     
  1344.     Controls which have no focus would always set focus to be pdActionFocusOff.
  1345.     
  1346.     Controls with a single focus would set pdActionFocusFirst when requsted to set either
  1347.     pdActionFocusFirst or pdActionFocusLast, and would set pdActionFocusOff for either
  1348.     pdActionFocusForward or pdActionFocusBackward.
  1349. */
  1350. enum {
  1351.     pdActionFocusOff            = 0,                            /* no focus */
  1352.     pdActionFocusFirst          = 1,                            /* focus on first element */
  1353.     pdActionFocusLast           = 2,                            /* focus on last element */
  1354.     pdActionFocusForward        = 3,                            /* focus on next element */
  1355.     pdActionFocusBackward       = 4                             /* focus on previous element */
  1356. };
  1357. struct QTCustomControlSetFocusRecord {
  1358.     void *                          storage;                    /* storage for the control*/
  1359.     long                            focus;                      /* focus to set, return resulting focus*/
  1360. };
  1361. typedef struct QTCustomControlSetFocusRecord QTCustomControlSetFocusRecord;
  1362. typedef QTCustomControlSetFocusRecord * QTCustomControlSetFocusPtr;
  1363. /* 
  1364.     pdActionCustomSetEditMenu will be called to inform your custom control of the location of the edit menu.
  1365.     
  1366.     If your control has editing boxes, this is useful in order to allow the user to perform cut/copy/paste operations
  1367.     when focus is on one of these boxes.
  1368. */
  1369. struct QTCustomControlSetEditMenuRecord {
  1370.     void *                          storage;                    /* storage for the control*/
  1371.     MenuHandle                      editMenu;                   /* edit menu, or NIL*/
  1372. };
  1373. typedef struct QTCustomControlSetEditMenuRecord QTCustomControlSetEditMenuRecord;
  1374. typedef QTCustomControlSetEditMenuRecord * QTCustomControlSetEditMenuPtr;
  1375. /*
  1376.     pdActionCustomSetPreviewPicture will be called to inform your custom control of preview information that you
  1377.     may wish to use in the drawing of your user interface.  
  1378. */
  1379. struct QTCustomControlSetPreviewPictureRecord {
  1380.     void *                          storage;                    /* storage for the control*/
  1381.     QTParamPreviewPtr               preview;                    /* preview to set*/
  1382. };
  1383. typedef struct QTCustomControlSetPreviewPictureRecord QTCustomControlSetPreviewPictureRecord;
  1384. typedef QTCustomControlSetPreviewPictureRecord * QTCustomControlSetPreviewPicturePtr;
  1385. /*
  1386.     pdActionCustomSetEditCallout tells your control of the need by the application to be informed of
  1387.     changes to the parameter values (typically for the purposes of updating previews).
  1388.     
  1389.     If a callout is available, your custom control should call it whenever a change has been
  1390.     made to the parameter(s) that your control is editing (as a result of user actions, most typically).
  1391.     If you choose not to implement this, live dragging or updating of values will not work.
  1392. */
  1393. struct QTCustomControlSetEditCalloutRecord {
  1394.     void *                          storage;                    /* storage for the control*/
  1395.     QTParamPreviewCalloutPtr        callout;                    /* requested callout, or NIL to disable*/
  1396. };
  1397. typedef struct QTCustomControlSetEditCalloutRecord QTCustomControlSetEditCalloutRecord;
  1398. typedef QTCustomControlSetEditCalloutRecord * QTCustomControlSetEditCalloutPtr;
  1399. /*
  1400.     pdActionCustomGetEnableValue allows you to return a value for the purposes of enabling/disabling
  1401.     other controls.
  1402.     Most custom controls do not need to implement this call.
  1403.     
  1404.     If your control is able to control the enabling and disabling of other parameter controls (such as is done
  1405.     by standard pop up or enumerated type controls), you need to supply a value that can be use for greater than/less than
  1406.     types of comparisons.
  1407. */
  1408. struct QTCustomControlGetEnableValueRecord {
  1409.     void *                          storage;                    /* storage for the control*/
  1410.     long                            currentValue;               /* value to compare against for enable/disable purposes*/
  1411. };
  1412. typedef struct QTCustomControlGetEnableValueRecord QTCustomControlGetEnableValueRecord;
  1413. typedef QTCustomControlGetEnableValueRecord * QTCustomControlGetEnableValuePtr;
  1414. /*
  1415.     pdActionCustomSetSampleTime tells your control information from the application about the duration
  1416.     and start time for the sample being edited.
  1417.     
  1418.     Most controls do not need this information, but some may choose to use it in the interface
  1419.     they present the user.  However, this call need not be made by applications, so the custom
  1420.     control should be prepared to run when the sample time information is not available.
  1421. */
  1422. struct QTCustomControlSetSampleTimeRecord {
  1423.     void *                          storage;                    /* storage for the control*/
  1424.     QTParamSampleTimePtr            sampleTime;                 /* sample time information or NIL*/
  1425. };
  1426. typedef struct QTCustomControlSetSampleTimeRecord QTCustomControlSetSampleTimeRecord;
  1427. typedef QTCustomControlSetSampleTimeRecord * QTCustomControlSetSampleTimePtr;
  1428. /*
  1429.     pdActionCustomGetValue tells your control to store any value(s) into the specified atom container.
  1430.     
  1431.     All custom controls must implement this call
  1432. */
  1433. struct QTCustomControlGetValueRecord {
  1434.     void *                          storage;                    /* storage for the control*/
  1435.     QTAtomContainer                 sample;                     /* sample to store into*/
  1436. };
  1437. typedef struct QTCustomControlGetValueRecord QTCustomControlGetValueRecord;
  1438. typedef QTCustomControlGetValueRecord * QTCustomControlGetValuePtr;
  1439. /*
  1440.     pdActionCustomDoEditCommand tells your control to handle edit commands if it allow focus and type in boxes.
  1441.     
  1442.     All custom controls must implement this call if they support edit boxes
  1443. */
  1444. struct QTCustomControlDoEditCommandRecord {
  1445.     void *                          storage;                    /* storage for the control*/
  1446.     long                            command;                    /* command to execute, return 0 here if processed*/
  1447. };
  1448. typedef struct QTCustomControlDoEditCommandRecord QTCustomControlDoEditCommandRecord;
  1449. typedef QTCustomControlDoEditCommandRecord * QTCustomControlDoEditCommandPtr;
  1450. typedef long                            QTParameterDialog;
  1451. enum {
  1452.     elOptionsIncludeNoneInList  = 0x00000001                    /* "None" effect is included in list */
  1453. };
  1454. typedef long                            QTEffectListOptions;
  1455. enum {
  1456.     pdOptionsCollectOneValue    = 0x00000001,                   /* should collect a single value only*/
  1457.     pdOptionsAllowOptionalInterpolations = 0x00000002,          /* non-novice interpolation options are shown */
  1458.     pdOptionsModalDialogBox     = 0x00000004,                   /* dialog box should be modal */
  1459.     pdOptionsEditCurrentEffectOnly = 0x00000008,                /* List of effects will not be shown */
  1460.     pdOptionsHidePreview        = 0x00000010                    /* Preview item will not be shown */
  1461. };
  1462. enum {
  1463.     effectIsRealtime            = 0                             /* effect can be rendered in real time */
  1464. };
  1465. /*
  1466.     QTGetEffectsListExtended is a call that provides for 
  1467.     more advanced filtering of effects to be placed into the
  1468.     effect list.  Applications can filter on:
  1469.      1) number of input sources
  1470.      2) effect major or minor class
  1471.      3) custom filtering through a callback
  1472.     The callback will be called for each effect which passes
  1473.     the other criteria for inclusion.  If the callback
  1474.     returns a true result the effect will be included in the list.
  1475.     
  1476.     Note that your filter proc may receive multiple effects from various
  1477.     manufacturers.  If you return true for multiple effects of a given type
  1478.     only the one with the higher parameter version number will be included.
  1479.     If you wish other filtering (such as effects from a given manufacturer, you
  1480.     can do this by return false for the other effects and true for those
  1481.     that you prefer.
  1482. */
  1483. typedef CALLBACK_API( Boolean , QTEffectListFilterProcPtr )(Component effect, long effectMinSource, long effectMaxSource, OSType majorClass, OSType minorClass, void *refcon);
  1484. typedef STACK_UPP_TYPE(QTEffectListFilterProcPtr)               QTEffectListFilterUPP;
  1485. EXTERN_API( OSErr )
  1486. QTGetEffectsList                (QTAtomContainer *      returnedList,
  1487.                                  long                   minSources,
  1488.                                  long                   maxSources,
  1489.                                  QTEffectListOptions    getOptions)                         THREEWORDINLINE(0x303C, 0x02C9, 0xAAAA);
  1490. EXTERN_API( OSErr )
  1491. QTGetEffectsListExtended        (QTAtomContainer *      returnedList,
  1492.                                  long                   minSources,
  1493.                                  long                   maxSources,
  1494.                                  QTEffectListOptions    getOptions,
  1495.                                  OSType                 majorClass,
  1496.                                  OSType                 minorClass,
  1497.                                  QTEffectListFilterUPP  filterProc,
  1498.                                  void *                 filterRefCon)                       THREEWORDINLINE(0x303C, 0x036D, 0xAAAA);
  1499. EXTERN_API( OSErr )
  1500. QTCreateStandardParameterDialog (QTAtomContainer        effectList,
  1501.                                  QTAtomContainer        parameters,
  1502.                                  QTParameterDialogOptions  dialogOptions,
  1503.                                  QTParameterDialog *    createdDialog)                      THREEWORDINLINE(0x303C, 0x02CA, 0xAAAA);
  1504. EXTERN_API( OSErr )
  1505. QTIsStandardParameterDialogEvent (EventRecord *         pEvent,
  1506.                                  QTParameterDialog      createdDialog)                      THREEWORDINLINE(0x303C, 0x02CB, 0xAAAA);
  1507. EXTERN_API( OSErr )
  1508. QTDismissStandardParameterDialog (QTParameterDialog     createdDialog)                      THREEWORDINLINE(0x303C, 0x02CC, 0xAAAA);
  1509. EXTERN_API( OSErr )
  1510. QTStandardParameterDialogDoAction (QTParameterDialog    createdDialog,
  1511.                                  long                   action,
  1512.                                  void *                 params)                             THREEWORDINLINE(0x303C, 0x02CD, 0xAAAA);
  1513. EXTERN_API( OSErr )
  1514. QTGetEffectSpeed                (QTAtomContainer        parameters,
  1515.                                  Fixed *                pFPS)                               THREEWORDINLINE(0x303C, 0x02D2, 0xAAAA);
  1516. /*****
  1517.     Error reporting
  1518. *****/
  1519. struct QTErrorReplacementRecord {
  1520.     long                            numEntries;
  1521.     StringPtr                       replacementString[1];       /* array of numEntries StringPtrs (each String is allocated separately).*/
  1522. };
  1523. typedef struct QTErrorReplacementRecord QTErrorReplacementRecord;
  1524. typedef QTErrorReplacementRecord *      QTErrorReplacementPtr;
  1525. /*
  1526.     QTAddMovieError is used to add orthogonal errors to a list of errors that will
  1527.     later be reported (at the end of an import or playback, for example).  Errors are stored
  1528.     in 'qter' resources within the component.
  1529.     
  1530.     QTAddMovieError(Movie       addTo,                          // in: movie to add error to
  1531.                     Component   adder,                          // in: component which is adding the error
  1532.                     long        errorCode,                      // in: error code being added
  1533.                     QTErrorReplacementPtr   stringReplacements);// in: list of strings to subsitute (in order) for "^1", "^2", etc
  1534. */
  1535. EXTERN_API( OSErr )
  1536. QTAddMovieError                 (Movie                  movieH,
  1537.                                  Component              c,
  1538.                                  long                   errorCode,
  1539.                                  QTErrorReplacementPtr  stringReplacements)                 THREEWORDINLINE(0x303C, 0x037A, 0xAAAA);
  1540. /*****
  1541.     Access Keys
  1542. *****/
  1543. enum {
  1544.     kAccessKeyAtomType          = FOUR_CHAR_CODE('acky')
  1545. };
  1546. enum {
  1547.     kAccessKeySystemFlag        = 1L << 0
  1548. };
  1549. EXTERN_API( OSErr )
  1550. QTGetAccessKeys                 (Str255                 accessKeyType,
  1551.                                  long                   flags,
  1552.                                  QTAtomContainer *      keys)                               THREEWORDINLINE(0x303C, 0x02B3, 0xAAAA);
  1553. EXTERN_API( OSErr )
  1554. QTRegisterAccessKey             (Str255                 accessKeyType,
  1555.                                  long                   flags,
  1556.                                  Handle                 accessKey)                          THREEWORDINLINE(0x303C, 0x02B4, 0xAAAA);
  1557. EXTERN_API( OSErr )
  1558. QTUnregisterAccessKey           (Str255                 accessKeyType,
  1559.                                  long                   flags,
  1560.                                  Handle                 accessKey)                          THREEWORDINLINE(0x303C, 0x02B5, 0xAAAA);
  1561. /*****
  1562.     Content Restrictions
  1563. *****/
  1564. EXTERN_API( OSErr )
  1565. QTGetMovieRestrictions          (Movie                  theMovie,
  1566.                                  QTRestrictionSet *     outRestrictionSet,
  1567.                                  UInt32 *               outSeed)                            THREEWORDINLINE(0x303C, 0x03A5, 0xAAAA);
  1568. EXTERN_API( OSErr )
  1569. QTRestrictionsGetInfo           (QTRestrictionSet       inRestrictionSet,
  1570.                                  long *                 outRestrictionClassCount,
  1571.                                  long *                 outSeed)                            THREEWORDINLINE(0x303C, 0x03A1, 0xAAAA);
  1572. EXTERN_API( OSErr )
  1573. QTRestrictionsGetIndClass       (QTRestrictionSet       inRestrictionSet,
  1574.                                  long                   inIndex,
  1575.                                  OSType *               outClass)                           THREEWORDINLINE(0x303C, 0x03A2, 0xAAAA);
  1576. EXTERN_API( OSErr )
  1577. QTRestrictionsGetItem           (QTRestrictionSet       inRestrictionSet,
  1578.                                  OSType                 inRestrictionClass,
  1579.                                  UInt32 *               outRestrictions)                    THREEWORDINLINE(0x303C, 0x03A3, 0xAAAA);
  1580. EXTERN_API( OSErr )
  1581. QTGetSupportedRestrictions      (OSType                 inRestrictionClass,
  1582.                                  UInt32 *               outRestrictionIDs)                  THREEWORDINLINE(0x303C, 0x03B2, 0xAAAA);
  1583. EXTERN_API( OSErr )
  1584. QTCreateUUID                    (QTUUID *               outUUID,
  1585.                                  long                   creationFlags)                      THREEWORDINLINE(0x303C, 0x039B, 0xAAAA);
  1586. EXTERN_API( Boolean )
  1587. QTEqualUUIDs                    (const QTUUID *         uuid1,
  1588.                                  const QTUUID *         uuid2)                              THREEWORDINLINE(0x303C, 0x039C, 0xAAAA);
  1589. /*****
  1590.     Time table
  1591. *****/
  1592. EXTERN_API( OSErr )
  1593. MakeTrackTimeTable              (Track                  trackH,
  1594.                                  long **                offsets,
  1595.                                  TimeValue              startTime,
  1596.                                  TimeValue              endTime,
  1597.                                  TimeValue              timeIncrement,
  1598.                                  short                  firstDataRefIndex,
  1599.                                  short                  lastDataRefIndex,
  1600.                                  long *                 retdataRefSkew)                     THREEWORDINLINE(0x303C, 0x02BE, 0xAAAA);
  1601. EXTERN_API( OSErr )
  1602. MakeMediaTimeTable              (Media                  theMedia,
  1603.                                  long **                offsets,
  1604.                                  TimeValue              startTime,
  1605.                                  TimeValue              endTime,
  1606.                                  TimeValue              timeIncrement,
  1607.                                  short                  firstDataRefIndex,
  1608.                                  short                  lastDataRefIndex,
  1609.                                  long *                 retdataRefSkew)                     THREEWORDINLINE(0x303C, 0x02BF, 0xAAAA);
  1610. EXTERN_API( OSErr )
  1611. GetMaxLoadedTimeInMovie         (Movie                  theMovie,
  1612.                                  TimeValue *            time)                               THREEWORDINLINE(0x303C, 0x02C0, 0xAAAA);
  1613. EXTERN_API( OSErr )
  1614. QTMovieNeedsTimeTable           (Movie                  theMovie,
  1615.                                  Boolean *              needsTimeTable)                     THREEWORDINLINE(0x303C, 0x02C3, 0xAAAA);
  1616. EXTERN_API( OSErr )
  1617. QTGetDataRefMaxFileOffset       (Movie                  movieH,
  1618.                                  OSType                 dataRefType,
  1619.                                  Handle                 dataRef,
  1620.                                  long *                 offset)                             THREEWORDINLINE(0x303C, 0x02C6, 0xAAAA);
  1621. /*****
  1622.     Bandwidth management support
  1623. *****/
  1624. enum {
  1625.     ConnectionSpeedPrefsType    = FOUR_CHAR_CODE('cspd'),
  1626.     BandwidthManagementPrefsType = FOUR_CHAR_CODE('bwmg')
  1627. };
  1628. struct ConnectionSpeedPrefsRecord {
  1629.     long                            connectionSpeed;
  1630. };
  1631. typedef struct ConnectionSpeedPrefsRecord ConnectionSpeedPrefsRecord;
  1632. typedef ConnectionSpeedPrefsRecord *    ConnectionSpeedPrefsPtr;
  1633. typedef ConnectionSpeedPrefsPtr *       ConnectionSpeedPrefsHandle;
  1634. struct BandwidthManagementPrefsRecord {
  1635.     Boolean                         overrideConnectionSpeedForBandwidth;
  1636. };
  1637. typedef struct BandwidthManagementPrefsRecord BandwidthManagementPrefsRecord;
  1638. typedef BandwidthManagementPrefsRecord * BandwidthManagementPrefsPtr;
  1639. typedef BandwidthManagementPrefsPtr *   BandwidthManagementPrefsHandle;
  1640. enum {
  1641.     kQTIdlePriority             = 10,
  1642.     kQTNonRealTimePriority      = 20,
  1643.     kQTRealTimeSharedPriority   = 25,
  1644.     kQTRealTimePriority         = 30
  1645. };
  1646. enum {
  1647.     kQTBandwidthNotifyNeedToStop = 1L << 0,
  1648.     kQTBandwidthNotifyGoodToGo  = 1L << 1,
  1649.     kQTBandwidthChangeRequest   = 1L << 2,
  1650.     kQTBandwidthQueueRequest    = 1L << 3,
  1651.     kQTBandwidthScheduledRequest = 1L << 4,
  1652.     kQTBandwidthVoluntaryRelease = 1L << 5
  1653. };
  1654. typedef CALLBACK_API( OSErr , QTBandwidthNotificationProcPtr )(long flags, void *reserved, void *refcon);
  1655. struct QTScheduledBandwidthRecord {
  1656.     long                            recordSize;                 /* total number of bytes in QTScheduledBandwidthRecord*/
  1657.     long                            priority;
  1658.     long                            dataRate;
  1659.     CompTimeValue                   startTime;                  /* bandwidth usage start time*/
  1660.     CompTimeValue                   duration;                   /* duration of bandwidth usage (0 if unknown)*/
  1661.     CompTimeValue                   prerollDuration;            /* time for negotiation before startTime (0 if unknown)*/
  1662.     TimeScale                       scale;                      /* timescale of value/duration/prerollDuration fields*/
  1663.     TimeBase                        base;                       /* timebase*/
  1664. };
  1665. typedef struct QTScheduledBandwidthRecord QTScheduledBandwidthRecord;
  1666. typedef QTScheduledBandwidthRecord *    QTScheduledBandwidthPtr;
  1667. typedef QTScheduledBandwidthPtr *       QTScheduledBandwidthHandle;
  1668. typedef STACK_UPP_TYPE(QTBandwidthNotificationProcPtr)          QTBandwidthNotificationUPP;
  1669. EXTERN_API( OSErr )
  1670. QTBandwidthRequest              (long                   priority,
  1671.                                  QTBandwidthNotificationUPP  callback,
  1672.                                  const void *           refcon,
  1673.                                  QTBandwidthReference * bwRef,
  1674.                                  long                   flags)                              THREEWORDINLINE(0x303C, 0x02F5, 0xAAAA);
  1675. EXTERN_API( OSErr )
  1676. QTBandwidthRequestForTimeBase   (TimeBase               tb,
  1677.                                  long                   priority,
  1678.                                  QTBandwidthNotificationUPP  callback,
  1679.                                  const void *           refcon,
  1680.                                  QTBandwidthReference * bwRef,
  1681.                                  long                   flags)                              THREEWORDINLINE(0x303C, 0x0318, 0xAAAA);
  1682. EXTERN_API( OSErr )
  1683. QTBandwidthRelease              (QTBandwidthReference   bwRef,
  1684.                                  long                   flags)                              THREEWORDINLINE(0x303C, 0x02F6, 0xAAAA);
  1685. EXTERN_API( OSErr )
  1686. QTScheduledBandwidthRequest     (QTScheduledBandwidthPtr  scheduleRec,
  1687.                                  QTBandwidthNotificationUPP  notificationCallback,
  1688.                                  void *                 refcon,
  1689.                                  QTScheduledBandwidthReference * sbwRef,
  1690.                                  long                   flags)                              THREEWORDINLINE(0x303C, 0x0310, 0xAAAA);
  1691. EXTERN_API( OSErr )
  1692. QTScheduledBandwidthRelease     (QTScheduledBandwidthReference  sbwRef,
  1693.                                  long                   flags)                              THREEWORDINLINE(0x303C, 0x0311, 0xAAAA);
  1694. #if OPAQUE_UPP_TYPES
  1695.     EXTERN_API(QTCallBackUPP)
  1696.     NewQTCallBackUPP               (QTCallBackProcPtr       userRoutine);
  1697.     EXTERN_API(QTSyncTaskUPP)
  1698.     NewQTSyncTaskUPP               (QTSyncTaskProcPtr       userRoutine);
  1699.     EXTERN_API(MovieRgnCoverUPP)
  1700.     NewMovieRgnCoverUPP            (MovieRgnCoverProcPtr    userRoutine);
  1701.     EXTERN_API(MovieProgressUPP)
  1702.     NewMovieProgressUPP            (MovieProgressProcPtr    userRoutine);
  1703.     EXTERN_API(MovieDrawingCompleteUPP)
  1704.     NewMovieDrawingCompleteUPP     (MovieDrawingCompleteProcPtr userRoutine);
  1705.     EXTERN_API(TrackTransferUPP)
  1706.     NewTrackTransferUPP            (TrackTransferProcPtr    userRoutine);
  1707.     EXTERN_API(GetMovieUPP)
  1708.     NewGetMovieUPP                 (GetMovieProcPtr         userRoutine);
  1709.     EXTERN_API(MoviePreviewCallOutUPP)
  1710.     NewMoviePreviewCallOutUPP      (MoviePreviewCallOutProcPtr userRoutine);
  1711.     EXTERN_API(TextMediaUPP)
  1712.     NewTextMediaUPP                (TextMediaProcPtr        userRoutine);
  1713.     EXTERN_API(ActionsUPP)
  1714.     NewActionsUPP                  (ActionsProcPtr          userRoutine);
  1715.     EXTERN_API(DoMCActionUPP)
  1716.     NewDoMCActionUPP               (DoMCActionProcPtr       userRoutine);
  1717.     EXTERN_API(MovieExecuteWiredActionsUPP)
  1718.     NewMovieExecuteWiredActionsUPP    (MovieExecuteWiredActionsProcPtr userRoutine);
  1719.     EXTERN_API(MoviePrePrerollCompleteUPP)
  1720.     NewMoviePrePrerollCompleteUPP    (MoviePrePrerollCompleteProcPtr userRoutine);
  1721.     EXTERN_API(QTNextTaskNeededSoonerCallbackUPP)
  1722.     NewQTNextTaskNeededSoonerCallbackUPP    (QTNextTaskNeededSoonerCallbackProcPtr userRoutine);
  1723.     EXTERN_API(MoviesErrorUPP)
  1724.     NewMoviesErrorUPP              (MoviesErrorProcPtr      userRoutine);
  1725.     EXTERN_API(TweenerDataUPP)
  1726.     NewTweenerDataUPP              (TweenerDataProcPtr      userRoutine);
  1727.     EXTERN_API(QTEffectListFilterUPP)
  1728.     NewQTEffectListFilterUPP       (QTEffectListFilterProcPtr userRoutine);
  1729.     EXTERN_API(QTBandwidthNotificationUPP)
  1730.     NewQTBandwidthNotificationUPP    (QTBandwidthNotificationProcPtr userRoutine);
  1731.     EXTERN_API(void)
  1732.     DisposeQTCallBackUPP           (QTCallBackUPP           userUPP);
  1733.     EXTERN_API(void)
  1734.     DisposeQTSyncTaskUPP           (QTSyncTaskUPP           userUPP);
  1735.     EXTERN_API(void)
  1736.     DisposeMovieRgnCoverUPP        (MovieRgnCoverUPP        userUPP);
  1737.     EXTERN_API(void)
  1738.     DisposeMovieProgressUPP        (MovieProgressUPP        userUPP);
  1739.     EXTERN_API(void)
  1740.     DisposeMovieDrawingCompleteUPP    (MovieDrawingCompleteUPP userUPP);
  1741.     EXTERN_API(void)
  1742.     DisposeTrackTransferUPP        (TrackTransferUPP        userUPP);
  1743.     EXTERN_API(void)
  1744.     DisposeGetMovieUPP             (GetMovieUPP             userUPP);
  1745.     EXTERN_API(void)
  1746.     DisposeMoviePreviewCallOutUPP    (MoviePreviewCallOutUPP userUPP);
  1747.     EXTERN_API(void)
  1748.     DisposeTextMediaUPP            (TextMediaUPP            userUPP);
  1749.     EXTERN_API(void)
  1750.     DisposeActionsUPP              (ActionsUPP              userUPP);
  1751.     EXTERN_API(void)
  1752.     DisposeDoMCActionUPP           (DoMCActionUPP           userUPP);
  1753.     EXTERN_API(void)
  1754.     DisposeMovieExecuteWiredActionsUPP    (MovieExecuteWiredActionsUPP userUPP);