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

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       Movies.h
  3.  
  4.      Contains:   QuickTime Interfaces.
  5.  
  6.      Version:    Technology: QuickTime 6.0
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1990-2001 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __MOVIES__
  18. #define __MOVIES__
  19. #ifndef __QUICKDRAW__
  20. #include "Quickdraw.h"
  21. #endif
  22. #ifndef __ALIASES__
  23. #include "Aliases.h"
  24. #endif
  25. #ifndef __EVENTS__
  26. #include "Events.h"
  27. #endif
  28. #ifndef __MENUS__
  29. #include "Menus.h"
  30. #endif
  31. #ifndef __COMPONENTS__
  32. #include "Components.h"
  33. #endif
  34. #ifndef __IMAGECOMPRESSION__
  35. #include "ImageCompression.h"
  36. #endif
  37. #if PRAGMA_ONCE
  38. #pragma once
  39. #endif
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43. #if PRAGMA_IMPORT
  44. #pragma import on
  45. #endif
  46. #if PRAGMA_STRUCT_ALIGN
  47.     #pragma options align=mac68k
  48. #elif PRAGMA_STRUCT_PACKPUSH
  49.     #pragma pack(push, 2)
  50. #elif PRAGMA_STRUCT_PACK
  51.     #pragma pack(2)
  52. #endif
  53. /*  "kFix1" is defined in FixMath as "fixed1"  */
  54. /* error codes are in Errors.[haa] */
  55. /* gestalt codes are in Gestalt.[hpa] */
  56. enum {
  57.     MovieFileType               = FOUR_CHAR_CODE('MooV'),
  58.     MovieScrapType              = FOUR_CHAR_CODE('moov')
  59. };
  60. enum {
  61.     MovieResourceType           = FOUR_CHAR_CODE('moov'),
  62.     MovieForwardPointerResourceType = FOUR_CHAR_CODE('fore'),
  63.     MovieBackwardPointerResourceType = FOUR_CHAR_CODE('back')
  64. };
  65. enum {
  66.     MovieResourceAtomType       = FOUR_CHAR_CODE('moov'),
  67.     MovieDataAtomType           = FOUR_CHAR_CODE('mdat'),
  68.     FreeAtomType                = FOUR_CHAR_CODE('free'),
  69.     SkipAtomType                = FOUR_CHAR_CODE('skip'),
  70.     WideAtomPlaceholderType     = FOUR_CHAR_CODE('wide')
  71. };
  72. enum {
  73.     MediaHandlerType            = FOUR_CHAR_CODE('mhlr'),
  74.     DataHandlerType             = FOUR_CHAR_CODE('dhlr')
  75. };
  76. enum {
  77.     VideoMediaType              = FOUR_CHAR_CODE('vide'),
  78.     SoundMediaType              = FOUR_CHAR_CODE('soun'),
  79.     TextMediaType               = FOUR_CHAR_CODE('text'),
  80.     BaseMediaType               = FOUR_CHAR_CODE('gnrc'),
  81.     MPEGMediaType               = FOUR_CHAR_CODE('MPEG'),
  82.     MusicMediaType              = FOUR_CHAR_CODE('musi'),
  83.     TimeCodeMediaType           = FOUR_CHAR_CODE('tmcd'),
  84.     SpriteMediaType             = FOUR_CHAR_CODE('sprt'),
  85.     FlashMediaType              = FOUR_CHAR_CODE('flsh'),
  86.     MovieMediaType              = FOUR_CHAR_CODE('moov'),
  87.     TweenMediaType              = FOUR_CHAR_CODE('twen'),
  88.     ThreeDeeMediaType           = FOUR_CHAR_CODE('qd3d'),
  89.     SkinMediaType               = FOUR_CHAR_CODE('skin'),
  90.     HandleDataHandlerSubType    = FOUR_CHAR_CODE('hndl'),
  91.     PointerDataHandlerSubType   = FOUR_CHAR_CODE('ptr '),
  92.     NullDataHandlerSubType      = FOUR_CHAR_CODE('null'),
  93.     ResourceDataHandlerSubType  = FOUR_CHAR_CODE('rsrc'),
  94.     URLDataHandlerSubType       = FOUR_CHAR_CODE('url '),
  95.     WiredActionHandlerType      = FOUR_CHAR_CODE('wire')
  96. };
  97. enum {
  98.     VisualMediaCharacteristic   = FOUR_CHAR_CODE('eyes'),
  99.     AudioMediaCharacteristic    = FOUR_CHAR_CODE('ears'),
  100.     kCharacteristicCanSendVideo = FOUR_CHAR_CODE('vsnd'),
  101.     kCharacteristicProvidesActions = FOUR_CHAR_CODE('actn'),
  102.     kCharacteristicNonLinear    = FOUR_CHAR_CODE('nonl'),
  103.     kCharacteristicCanStep      = FOUR_CHAR_CODE('step'),
  104.     kCharacteristicHasNoDuration = FOUR_CHAR_CODE('noti'),
  105.     kCharacteristicHasSkinData  = FOUR_CHAR_CODE('skin'),
  106.     kCharacteristicProvidesKeyFocus = FOUR_CHAR_CODE('keyf')
  107. };
  108. enum {
  109.     kUserDataMovieControllerType = FOUR_CHAR_CODE('ctyp'),
  110.     kUserDataName               = FOUR_CHAR_CODE('name'),
  111.     kUserDataTextAlbum          = FOUR_CHAR_CODE('゛lb'),
  112.     kUserDataTextArtist         = FOUR_CHAR_CODE('〢RT'),
  113.     kUserDataTextAuthor         = FOUR_CHAR_CODE('゛ut'),
  114.     kUserDataTextChapter        = FOUR_CHAR_CODE('ヽhp'),
  115.     kUserDataTextComment        = FOUR_CHAR_CODE('ヽmt'),
  116.     kUserDataTextComposer       = FOUR_CHAR_CODE('ヽom'),
  117.     kUserDataTextCopyright      = FOUR_CHAR_CODE('ヽpy'),
  118.     kUserDataTextCreationDate   = FOUR_CHAR_CODE('ヾay'),
  119.     kUserDataTextDescription    = FOUR_CHAR_CODE('ヾes'),
  120.     kUserDataTextDirector       = FOUR_CHAR_CODE('ヾir'),
  121.     kUserDataTextDisclaimer     = FOUR_CHAR_CODE('ヾis'),
  122.     kUserDataTextEncodedBy      = FOUR_CHAR_CODE('〆nc'),
  123.     kUserDataTextFullName       = FOUR_CHAR_CODE('﹏am'),
  124.     kUserDataTextGenre          = FOUR_CHAR_CODE('ゞen'),
  125.     kUserDataTextHostComputer   = FOUR_CHAR_CODE('﹉st'),
  126.     kUserDataTextInformation    = FOUR_CHAR_CODE('﹊nf'),
  127.     kUserDataTextKeywords       = FOUR_CHAR_CODE('﹌ey'),
  128.     kUserDataTextMake           = FOUR_CHAR_CODE('﹎ak'),
  129.     kUserDataTextModel          = FOUR_CHAR_CODE('﹎od'),
  130.     kUserDataTextOriginalArtist = FOUR_CHAR_CODE('﹐pe'),
  131.     kUserDataTextOriginalFormat = FOUR_CHAR_CODE('ゝmt'),
  132.     kUserDataTextOriginalSource = FOUR_CHAR_CODE('﹕rc'),
  133.     kUserDataTextPerformers     = FOUR_CHAR_CODE('﹑rf'),
  134.     kUserDataTextProducer       = FOUR_CHAR_CODE('﹑rd'),
  135.     kUserDataTextProduct        = FOUR_CHAR_CODE('㏄RD'),
  136.     kUserDataTextSoftware       = FOUR_CHAR_CODE('﹕wr'),
  137.     kUserDataTextSpecialPlaybackRequirements = FOUR_CHAR_CODE('﹔eq'),
  138.     kUserDataTextTrack          = FOUR_CHAR_CODE('﹖rk'),
  139.     kUserDataTextWarning        = FOUR_CHAR_CODE('﹚rn'),
  140.     kUserDataTextWriter         = FOUR_CHAR_CODE('﹚rt'),
  141.     kUserDataTextURLLink        = FOUR_CHAR_CODE('﹗rl'),
  142.     kUserDataTextEditDate1      = FOUR_CHAR_CODE('〆d1')
  143. };
  144. enum {
  145.     kUserDataUnicodeBit         = 1L << 7
  146. };
  147. enum {
  148.     DoTheRightThing             = 0
  149. };
  150. struct MovieRecord {
  151.     long                            data[1];
  152. };
  153. typedef struct MovieRecord              MovieRecord;
  154. typedef MovieRecord *                   Movie;
  155. typedef Movie *                         MoviePtr;
  156. struct TrackRecord {
  157.     long                            data[1];
  158. };
  159. typedef struct TrackRecord              TrackRecord;
  160. typedef TrackRecord *                   Track;
  161. struct MediaRecord {
  162.     long                            data[1];
  163. };
  164. typedef struct MediaRecord              MediaRecord;
  165. typedef MediaRecord *                   Media;
  166. struct UserDataRecord {
  167.     long                            data[1];
  168. };
  169. typedef struct UserDataRecord           UserDataRecord;
  170. typedef UserDataRecord *                UserData;
  171. struct TrackEditStateRecord {
  172.     long                            data[1];
  173. };
  174. typedef struct TrackEditStateRecord     TrackEditStateRecord;
  175. typedef TrackEditStateRecord *          TrackEditState;
  176. struct MovieEditStateRecord {
  177.     long                            data[1];
  178. };
  179. typedef struct MovieEditStateRecord     MovieEditStateRecord;
  180. typedef MovieEditStateRecord *          MovieEditState;
  181. struct QTRestrictionSetRecord {
  182.     long                            data[1];
  183. };
  184. typedef struct QTRestrictionSetRecord   QTRestrictionSetRecord;
  185. typedef QTRestrictionSetRecord *        QTRestrictionSet;
  186. struct SpriteWorldRecord {
  187.     long                            data[1];
  188. };
  189. typedef struct SpriteWorldRecord        SpriteWorldRecord;
  190. typedef SpriteWorldRecord *             SpriteWorld;
  191. struct SpriteRecord {
  192.     long                            data[1];
  193. };
  194. typedef struct SpriteRecord             SpriteRecord;
  195. typedef SpriteRecord *                  Sprite;
  196. struct QTTweenerRecord {
  197.     long                            data[1];
  198. };
  199. typedef struct QTTweenerRecord          QTTweenerRecord;
  200. typedef QTTweenerRecord *               QTTweener;
  201. struct SampleDescription {
  202.     long                            descSize;
  203.     long                            dataFormat;
  204.     long                            resvd1;
  205.     short                           resvd2;
  206.     short                           dataRefIndex;
  207. };
  208. typedef struct SampleDescription        SampleDescription;
  209. typedef SampleDescription *             SampleDescriptionPtr;
  210. typedef SampleDescriptionPtr *          SampleDescriptionHandle;
  211. typedef struct OpaqueQTBandwidthReference*  QTBandwidthReference;
  212. typedef struct OpaqueQTScheduledBandwidthReference*  QTScheduledBandwidthReference;
  213. enum {
  214.     kQTNetworkStatusNoNetwork   = -2,
  215.     kQTNetworkStatusUncertain   = -1,
  216.     kQTNetworkStatusNotConnected = 0,
  217.     kQTNetworkStatusConnected   = 1
  218. };
  219. typedef Handle                          QTAtomContainer;
  220. typedef long                            QTAtom;
  221. typedef long                            QTAtomType;
  222. typedef long                            QTAtomID;
  223. /* QTFloatDouble is the 64-bit IEEE-754 standard*/
  224. typedef Float64                         QTFloatDouble;
  225. /* QTFloatSingle is the 32-bit IEEE-754 standard*/
  226. typedef Float32                         QTFloatSingle;
  227. struct SoundDescription {
  228.     long                            descSize;                   /* total size of SoundDescription including extra data */
  229.     long                            dataFormat;                 /* sound format */
  230.     long                            resvd1;                     /* reserved for apple use. set to zero */
  231.     short                           resvd2;                     /* reserved for apple use. set to zero */
  232.     short                           dataRefIndex;
  233.     short                           version;                    /* which version is this data */
  234.     short                           revlevel;                   /* what version of that codec did this */
  235.     long                            vendor;                     /* whose  codec compressed this data */
  236.     short                           numChannels;                /* number of channels of sound */
  237.     short                           sampleSize;                 /* number of bits per sample */
  238.     short                           compressionID;              /* unused. set to zero. */
  239.     short                           packetSize;                 /* unused. set to zero. */
  240.     UnsignedFixed                   sampleRate;                 /* sample rate sound is captured at */
  241. };
  242. typedef struct SoundDescription         SoundDescription;
  243. typedef SoundDescription *              SoundDescriptionPtr;
  244. typedef SoundDescriptionPtr *           SoundDescriptionHandle;
  245. /* version 1 of the SoundDescription record*/
  246. struct SoundDescriptionV1 {
  247.                                                                 /* original fields*/
  248.     SoundDescription                desc;
  249.                                                                 /* fixed compression ratio information*/
  250.     unsigned long                   samplesPerPacket;
  251.     unsigned long                   bytesPerPacket;
  252.     unsigned long                   bytesPerFrame;
  253.     unsigned long                   bytesPerSample;
  254.                                                                 /* additional atom based fields ([long size, long type, some data], repeat)*/
  255. };
  256. typedef struct SoundDescriptionV1       SoundDescriptionV1;
  257. typedef SoundDescriptionV1 *            SoundDescriptionV1Ptr;
  258. typedef SoundDescriptionV1Ptr *         SoundDescriptionV1Handle;
  259. struct TextDescription {
  260.     long                            descSize;                   /* Total size of TextDescription*/
  261.     long                            dataFormat;                 /* 'text'*/
  262.     long                            resvd1;
  263.     short                           resvd2;
  264.     short                           dataRefIndex;
  265.     long                            displayFlags;               /* see enum below for flag values*/
  266.     long                            textJustification;          /* Can be: teCenter,teFlush -Default,-Right,-Left*/
  267.     RGBColor                        bgColor;                    /* Background color*/
  268.     Rect                            defaultTextBox;             /* Location to place the text within the track bounds*/
  269.     ScrpSTElement                   defaultStyle;               /* Default style (struct defined in TextEdit.h)*/
  270.     char                            defaultFontName[1];         /* Font Name (pascal string - struct extended to fit) */
  271. };
  272. typedef struct TextDescription          TextDescription;
  273. typedef TextDescription *               TextDescriptionPtr;
  274. typedef TextDescriptionPtr *            TextDescriptionHandle;
  275. struct SpriteDescription {
  276.     long                            descSize;                   /* total size of SpriteDescription including extra data */
  277.     long                            dataFormat;                 /*  */
  278.     long                            resvd1;                     /* reserved for apple use */
  279.     short                           resvd2;
  280.     short                           dataRefIndex;
  281.     long                            version;                    /* which version is this data */
  282.     OSType                          decompressorType;           /* which decompressor to use, 0 for no decompression */
  283.     long                            sampleFlags;                /* how to interpret samples */
  284. };
  285. typedef struct SpriteDescription        SpriteDescription;
  286. typedef SpriteDescription *             SpriteDescriptionPtr;
  287. typedef SpriteDescriptionPtr *          SpriteDescriptionHandle;
  288. struct FlashDescription {
  289.     long                            descSize;
  290.     long                            dataFormat;
  291.     long                            resvd1;
  292.     short                           resvd2;
  293.     short                           dataRefIndex;
  294.     long                            version;                    /* which version is this data */
  295.     OSType                          decompressorType;           /* which decompressor to use, 0 for no decompression */
  296.     long                            flags;
  297. };
  298. typedef struct FlashDescription         FlashDescription;
  299. typedef FlashDescription *              FlashDescriptionPtr;
  300. typedef FlashDescriptionPtr *           FlashDescriptionHandle;
  301. struct ThreeDeeDescription {
  302.     long                            descSize;                   /* total size of ThreeDeeDescription including extra data */
  303.     long                            dataFormat;                 /*  */
  304.     long                            resvd1;                     /* reserved for apple use */
  305.     short                           resvd2;
  306.     short                           dataRefIndex;
  307.     long                            version;                    /* which version is this data */
  308.     long                            rendererType;               /* which renderer to use, 0 for default */
  309.     long                            decompressorType;           /* which decompressor to use, 0 for default */
  310. };
  311. typedef struct ThreeDeeDescription      ThreeDeeDescription;
  312. typedef ThreeDeeDescription *           ThreeDeeDescriptionPtr;
  313. typedef ThreeDeeDescriptionPtr *        ThreeDeeDescriptionHandle;
  314. struct DataReferenceRecord {
  315.     OSType                          dataRefType;
  316.     Handle                          dataRef;
  317. };
  318. typedef struct DataReferenceRecord      DataReferenceRecord;
  319. typedef DataReferenceRecord *           DataReferencePtr;
  320. /*--------------------------
  321.   Music Sample Description
  322. --------------------------*/
  323. struct MusicDescription {
  324.     long                            descSize;
  325.     long                            dataFormat;                 /* 'musi' */
  326.     long                            resvd1;
  327.     short                           resvd2;
  328.     short                           dataRefIndex;
  329.     long                            musicFlags;
  330.     unsigned long                   headerData[1];              /* variable size! */
  331. };
  332. typedef struct MusicDescription         MusicDescription;
  333. typedef MusicDescription *              MusicDescriptionPtr;
  334. typedef MusicDescriptionPtr *           MusicDescriptionHandle;
  335. enum {
  336.     kMusicFlagDontPlay2Soft     = 1L << 0,
  337.     kMusicFlagDontSlaveToMovie  = 1L << 1
  338. };
  339. enum {
  340.     dfDontDisplay               = 1 << 0,                       /* Don't display the text*/
  341.     dfDontAutoScale             = 1 << 1,                       /* Don't scale text as track bounds grows or shrinks*/
  342.     dfClipToTextBox             = 1 << 2,                       /* Clip update to the textbox*/
  343.     dfUseMovieBGColor           = 1 << 3,                       /* Set text background to movie's background color*/
  344.     dfShrinkTextBoxToFit        = 1 << 4,                       /* Compute minimum box to fit the sample*/
  345.     dfScrollIn                  = 1 << 5,                       /* Scroll text in until last of text is in view */
  346.     dfScrollOut                 = 1 << 6,                       /* Scroll text out until last of text is gone (if both set, scroll in then out)*/
  347.     dfHorizScroll               = 1 << 7,                       /* Scroll text horizontally (otherwise it's vertical)*/
  348.     dfReverseScroll             = 1 << 8,                       /* vert: scroll down rather than up; horiz: scroll backwards (justfication dependent)*/
  349.     dfContinuousScroll          = 1 << 9,                       /* new samples cause previous samples to scroll out */
  350.     dfFlowHoriz                 = 1 << 10,                      /* horiz scroll text flows in textbox rather than extend to right */
  351.     dfContinuousKaraoke         = 1 << 11,                      /* ignore begin offset, hilite everything up to the end offset(karaoke)*/
  352.     dfDropShadow                = 1 << 12,                      /* display text with a drop shadow */
  353.     dfAntiAlias                 = 1 << 13,                      /* attempt to display text anti aliased*/
  354.     dfKeyedText                 = 1 << 14,                      /* key the text over background*/
  355.     dfInverseHilite             = 1 << 15,                      /* Use inverse hiliting rather than using hilite color*/
  356.     dfTextColorHilite           = 1 << 16                       /* changes text color in place of hiliting. */
  357. };
  358. enum {
  359.     searchTextDontGoToFoundTime = 1L << 16,
  360.     searchTextDontHiliteFoundText = 1L << 17,
  361.     searchTextOneTrackOnly      = 1L << 18,
  362.     searchTextEnabledTracksOnly = 1L << 19
  363. };
  364. /*use these with the text property routines*/
  365. enum {
  366.                                                                 /* set property parameter / get property parameter*/
  367.     kTextTextHandle             = 1,                            /* Handle / preallocated Handle*/
  368.     kTextTextPtr                = 2,                            /* Pointer*/
  369.     kTextTEStyle                = 3,                            /* TextStyle * / TextStyle **/
  370.     kTextSelection              = 4,                            /* long [2] / long [2]*/
  371.     kTextBackColor              = 5,                            /* RGBColor * / RGBColor **/
  372.     kTextForeColor              = 6,                            /* RGBColor * / RGBColor **/
  373.     kTextFace                   = 7,                            /* long / long **/
  374.     kTextFont                   = 8,                            /* long / long **/
  375.     kTextSize                   = 9,                            /* long / long **/
  376.     kTextAlignment              = 10,                           /* short * / short **/
  377.     kTextHilite                 = 11,                           /* hiliteRecord * / hiliteRecord **/
  378.     kTextDropShadow             = 12,                           /* dropShadowRecord * / dropShadowRecord **/
  379.     kTextDisplayFlags           = 13,                           /* long / long **/
  380.     kTextScroll                 = 14,                           /* TimeValue * / TimeValue **/
  381.     kTextRelativeScroll         = 15,                           /* Point **/
  382.     kTextHyperTextFace          = 16,                           /* hyperTextSetFace * / hyperTextSetFace **/
  383.     kTextHyperTextColor         = 17,                           /* hyperTextSetColor * / hyperTextSetColor **/
  384.     kTextKeyEntry               = 18,                           /* short*/
  385.     kTextMouseDown              = 19,                           /* Point **/
  386.     kTextTextBox                = 20,                           /* Rect * / Rect **/
  387.     kTextEditState              = 21,                           /* short / short **/
  388.     kTextLength                 = 22                            /*       / long **/
  389. };
  390. enum {
  391.     k3DMediaRendererEntry       = FOUR_CHAR_CODE('rend'),
  392.     k3DMediaRendererName        = FOUR_CHAR_CODE('name'),
  393.     k3DMediaRendererCode        = FOUR_CHAR_CODE('rcod')
  394. };
  395. /* progress messages */
  396. enum {
  397.     movieProgressOpen           = 0,
  398.     movieProgressUpdatePercent  = 1,
  399.     movieProgressClose          = 2
  400. };
  401. /* progress operations */
  402. enum {
  403.     progressOpFlatten           = 1,
  404.     progressOpInsertTrackSegment = 2,
  405.     progressOpInsertMovieSegment = 3,
  406.     progressOpPaste             = 4,
  407.     progressOpAddMovieSelection = 5,
  408.     progressOpCopy              = 6,
  409.     progressOpCut               = 7,
  410.     progressOpLoadMovieIntoRam  = 8,
  411.     progressOpLoadTrackIntoRam  = 9,
  412.     progressOpLoadMediaIntoRam  = 10,
  413.     progressOpImportMovie       = 11,
  414.     progressOpExportMovie       = 12
  415. };
  416. enum {
  417.     mediaQualityDraft           = 0x0000,
  418.     mediaQualityNormal          = 0x0040,
  419.     mediaQualityBetter          = 0x0080,
  420.     mediaQualityBest            = 0x00C0
  421. };
  422. /*****
  423.     Interactive Sprites Support
  424. *****/
  425. /* QTEventRecord flags*/
  426. enum {
  427.     kQTEventPayloadIsQTList     = 1L << 0
  428. };
  429. struct QTEventRecord {
  430.     long                            version;
  431.     OSType                          eventType;
  432.     Point                           where;
  433.     long                            flags;
  434.     long                            payloadRefcon;              /* from here down only present if version >= 2*/
  435.     long                            param1;
  436.     long                            param2;
  437.     long                            param3;
  438. };
  439. typedef struct QTEventRecord            QTEventRecord;
  440. typedef QTEventRecord *                 QTEventRecordPtr;
  441. struct QTAtomSpec {
  442.     QTAtomContainer                 container;
  443.     QTAtom                          atom;
  444. };
  445. typedef struct QTAtomSpec               QTAtomSpec;
  446. typedef QTAtomSpec *                    QTAtomSpecPtr;
  447. struct ResolvedQTEventSpec {
  448.     QTAtomSpec                      actionAtom;
  449.     Track                           targetTrack;
  450.     long                            targetRefCon;
  451. };
  452. typedef struct ResolvedQTEventSpec      ResolvedQTEventSpec;
  453. typedef ResolvedQTEventSpec *           ResolvedQTEventSpecPtr;
  454. /* action constants */
  455. enum {
  456.     kActionMovieSetVolume       = 1024,                         /* (short movieVolume) */
  457.     kActionMovieSetRate         = 1025,                         /* (Fixed rate) */
  458.     kActionMovieSetLoopingFlags = 1026,                         /* (long loopingFlags) */
  459.     kActionMovieGoToTime        = 1027,                         /* (TimeValue time) */
  460.     kActionMovieGoToTimeByName  = 1028,                         /* (Str255 timeName) */
  461.     kActionMovieGoToBeginning   = 1029,                         /* no params */
  462.     kActionMovieGoToEnd         = 1030,                         /* no params */
  463.     kActionMovieStepForward     = 1031,                         /* no params */
  464.     kActionMovieStepBackward    = 1032,                         /* no params */
  465.     kActionMovieSetSelection    = 1033,                         /* (TimeValue startTime, TimeValue endTime) */
  466.     kActionMovieSetSelectionByName = 1034,                      /* (Str255 startTimeName, Str255 endTimeName) */
  467.     kActionMoviePlaySelection   = 1035,                         /* (Boolean selectionOnly) */
  468.     kActionMovieSetLanguage     = 1036,                         /* (long language) */
  469.     kActionMovieChanged         = 1037,                         /* no params */
  470.     kActionMovieRestartAtTime   = 1038,                         /* (TimeValue startTime, Fixed rate) */
  471.     kActionMovieGotoNextChapter = 1039,                         /* no params */
  472.     kActionMovieGotoPreviousChapter = 1040,                     /* no params */
  473.     kActionMovieGotoFirstChapter = 1041,                        /* no params */
  474.     kActionMovieGotoLastChapter = 1042,                         /* no params */
  475.     kActionMovieGotoChapterByIndex = 1043,                      /* ( short index ) */
  476.     kActionMovieSetScale        = 1044,                         /* (Fixed xScale, Fixed yScale) */
  477.     kActionTrackSetVolume       = 2048,                         /* (short volume) */
  478.     kActionTrackSetBalance      = 2049,                         /* (short balance) */
  479.     kActionTrackSetEnabled      = 2050,                         /* (Boolean enabled) */
  480.     kActionTrackSetMatrix       = 2051,                         /* (MatrixRecord matrix) */
  481.     kActionTrackSetLayer        = 2052,                         /* (short layer) */
  482.     kActionTrackSetClip         = 2053,                         /* (RgnHandle clip) */
  483.     kActionTrackSetCursor       = 2054,                         /* (QTATomID cursorID) */
  484.     kActionTrackSetGraphicsMode = 2055,                         /* (ModifierTrackGraphicsModeRecord graphicsMode) */
  485.     kActionTrackSetIdleFrequency = 2056,                        /* (long frequency) */
  486.     kActionTrackSetBassTreble   = 2057,                         /* (short base, short treble) */
  487.     kActionSpriteSetMatrix      = 3072,                         /* (MatrixRecord matrix) */
  488.     kActionSpriteSetImageIndex  = 3073,                         /* (short imageIndex) */
  489.     kActionSpriteSetVisible     = 3074,                         /* (short visible) */
  490.     kActionSpriteSetLayer       = 3075,                         /* (short layer) */
  491.     kActionSpriteSetGraphicsMode = 3076,                        /* (ModifierTrackGraphicsModeRecord graphicsMode) */
  492.     kActionSpritePassMouseToCodec = 3078,                       /* no params */
  493.     kActionSpriteClickOnCodec   = 3079,                         /* Point localLoc */
  494.     kActionSpriteTranslate      = 3080,                         /* (Fixed x, Fixed y, Boolean isAbsolute) */
  495.     kActionSpriteScale          = 3081,                         /* (Fixed xScale, Fixed yScale) */
  496.     kActionSpriteRotate         = 3082,                         /* (Fixed degrees) */
  497.     kActionSpriteStretch        = 3083,                         /* (Fixed p1x, Fixed p1y, Fixed p2x, Fixed p2y, Fixed p3x, Fixed p3y, Fixed p4x, Fixed p4y) */
  498.     kActionSpriteSetCanBeHitTested = 3094,                      /* (short canBeHitTested) */
  499.     kActionQTVRSetPanAngle      = 4096,                         /* (float panAngle) */
  500.     kActionQTVRSetTiltAngle     = 4097,                         /* (float tiltAngle) */
  501.     kActionQTVRSetFieldOfView   = 4098,                         /* (float fieldOfView) */
  502.     kActionQTVRShowDefaultView  = 4099,                         /* no params */
  503.     kActionQTVRGoToNodeID       = 4100,                         /* (UInt32 nodeID) */
  504.     kActionQTVREnableHotSpot    = 4101,                         /* long ID, Boolean enable */
  505.     kActionQTVRShowHotSpots     = 4102,                         /* Boolean show */
  506.     kActionQTVRTranslateObject  = 4103,                         /* float xMove, float yMove */
  507.     kActionQTVRSetViewState     = 4109,                         /* long viewStateType, short state */
  508.     kActionMusicPlayNote        = 5120,                         /* (long sampleDescIndex, long partNumber, long delay, long pitch, long velocity, long duration) */
  509.     kActionMusicSetController   = 5121,                         /* (long sampleDescIndex, long partNumber, long delay, long controller, long value) */
  510.     kActionCase                 = 6144,                         /* [(CaseStatementActionAtoms)] */
  511.     kActionWhile                = 6145,                         /* [(WhileStatementActionAtoms)] */
  512.     kActionGoToURL              = 6146,                         /* (C string urlLink) */
  513.     kActionSendQTEventToSprite  = 6147,                         /* ([(SpriteTargetAtoms)], QTEventRecord theEvent) */
  514.     kActionDebugStr             = 6148,                         /* (Str255 theString) */
  515.     kActionPushCurrentTime      = 6149,                         /* no params */
  516.     kActionPushCurrentTimeWithLabel = 6150,                     /* (Str255 theLabel) */
  517.     kActionPopAndGotoTopTime    = 6151,                         /* no params */
  518.     kActionPopAndGotoLabeledTime = 6152,                        /* (Str255 theLabel) */
  519.     kActionStatusString         = 6153,                         /* (C string theString, long stringTypeFlags) */
  520.     kActionSendQTEventToTrackObject = 6154,                     /* ([(TrackObjectTargetAtoms)], QTEventRecord theEvent) */
  521.     kActionAddChannelSubscription = 6155,                       /* (Str255 channelName, C string channelsURL, C string channelsPictureURL) */
  522.     kActionRemoveChannelSubscription = 6156,                    /* (C string channelsURL) */
  523.     kActionOpenCustomActionHandler = 6157,                      /* (long handlerID, ComponentDescription handlerDesc) */
  524.     kActionDoScript             = 6158,                         /* (long scriptTypeFlags, CString command, CString arguments) */
  525.     kActionDoCompressedActions  = 6159,                         /* (compressed QTAtomContainer prefixed with eight bytes: long compressorType, long decompressedSize) */
  526.     kActionSendAppMessage       = 6160,                         /* (long appMessageID) */
  527.     kActionLoadComponent        = 6161,                         /* (ComponentDescription handlerDesc) */
  528.     kActionSetFocus             = 6162,                         /* [(TargetAtoms theObject)] */
  529.     kActionDontPassKeyEvent     = 6163,                         /* no params */
  530.     kActionSetRandomSeed        = 6164,                         /* long randomSeed */
  531.     kActionSpriteTrackSetVariable = 7168,                       /* (QTAtomID variableID, float value) */
  532.     kActionSpriteTrackNewSprite = 7169,                         /* (QTAtomID spriteID, short imageIndex, MatrixRecord *matrix, short visible, short layer, ModifierTrackGraphicsModeRecord *graphicsMode, QTAtomID actionHandlingSpriteID) */
  533.     kActionSpriteTrackDisposeSprite = 7170,                     /* (QTAtomID spriteID) */
  534.     kActionSpriteTrackSetVariableToString = 7171,               /* (QTAtomID variableID, C string value) */
  535.     kActionSpriteTrackConcatVariables = 7172,                   /* (QTAtomID firstVariableID, QTAtomID secondVariableID, QTAtomID resultVariableID ) */
  536.     kActionSpriteTrackSetVariableToMovieURL = 7173,             /* (QTAtomID variableID, < optional: [(MovieTargetAtoms)] > ) */
  537.     kActionSpriteTrackSetVariableToMovieBaseURL = 7174,         /* (QTAtomID variableID, < optional: [(MovieTargetAtoms)] > ) */
  538.     kActionSpriteTrackSetAllSpritesHitTestingMode = 7181,
  539.     kActionSpriteTrackNewImage  = 7182,                         /* (C string imageURL, QTAtomID desiredID) */
  540.     kActionSpriteTrackDisposeImage = 7183,                      /* (short imageIndex) */
  541.     kActionApplicationNumberAndString = 8192,                   /* (long aNumber, Str255 aString ) */
  542.     kActionQD3DNamedObjectTranslateTo = 9216,                   /* (Fixed x, Fixed y, Fixed z ) */
  543.     kActionQD3DNamedObjectScaleTo = 9217,                       /* (Fixed xScale, Fixed yScale, Fixed zScale ) */
  544.     kActionQD3DNamedObjectRotateTo = 9218,                      /* (Fixed xDegrees, Fixed yDegrees, Fixed zDegrees ) */
  545.     kActionFlashTrackSetPan     = 10240,                        /* (short xPercent, short yPercent ) */
  546.     kActionFlashTrackSetZoom    = 10241,                        /* (short zoomFactor ) */
  547.     kActionFlashTrackSetZoomRect = 10242,                       /* (long left, long top, long right, long bottom ) */
  548.     kActionFlashTrackGotoFrameNumber = 10243,                   /* (long frameNumber ) */
  549.     kActionFlashTrackGotoFrameLabel = 10244,                    /* (C string frameLabel ) */
  550.     kActionFlashTrackSetFlashVariable = 10245,                  /* (C string path, C string name, C string value, Boolean updateFocus) */
  551.     kActionFlashTrackDoButtonActions = 10246,                   /* (C string path, long buttonID, long transition) */
  552.     kActionMovieTrackAddChildMovie = 11264,                     /* (QTAtomID childMovieID, C string childMovieURL) */
  553.     kActionMovieTrackLoadChildMovie = 11265,                    /* (QTAtomID childMovieID) */
  554.     kActionMovieTrackLoadChildMovieWithQTListParams = 11266,    /* (QTAtomID childMovieID, C string qtlistXML) */
  555.     kActionTextTrackPasteText   = 12288,                        /* (C string theText, long startSelection, long endSelection ) */
  556.     kActionTextTrackSetTextBox  = 12291,                        /* (short left, short top, short right, short bottom) */
  557.     kActionTextTrackSetTextStyle = 12292,                       /* (Handle textStyle) */
  558.     kActionTextTrackSetSelection = 12293,                       /* (long startSelection, long endSelection ) */
  559.     kActionTextTrackSetBackgroundColor = 12294,                 /* (ModifierTrackGraphicsModeRecord backgroundColor ) */
  560.     kActionTextTrackSetForegroundColor = 12295,                 /* (ModifierTrackGraphicsModeRecord foregroundColor ) */
  561.     kActionTextTrackSetFace     = 12296,                        /* (long fontFace ) */
  562.     kActionTextTrackSetFont     = 12297,                        /* (long fontID ) */
  563.     kActionTextTrackSetSize     = 12298,                        /* (long fontSize ) */
  564.     kActionTextTrackSetAlignment = 12299,                       /* (short alignment ) */
  565.     kActionTextTrackSetHilite   = 12300,                        /* (long startHighlight, long endHighlight, ModifierTrackGraphicsModeRecord highlightColor ) */
  566.     kActionTextTrackSetDropShadow = 12301,                      /* (Point dropShadow, short transparency ) */
  567.     kActionTextTrackSetDisplayFlags = 12302,                    /* (long flags ) */
  568.     kActionTextTrackSetScroll   = 12303,                        /* (long delay ) */
  569.     kActionTextTrackRelativeScroll = 12304,                     /* (short deltaX, short deltaY ) */
  570.     kActionTextTrackFindText    = 12305,                        /* (long flags, Str255 theText, ModifierTrackGraphicsModeRecord highlightColor ) */
  571.     kActionTextTrackSetHyperTextFace = 12306,                   /* (short index, long fontFace ) */
  572.     kActionTextTrackSetHyperTextColor = 12307,                  /* (short index, ModifierTrackGraphicsModeRecord highlightColor ) */
  573.     kActionTextTrackKeyEntry    = 12308,                        /* (short character ) */
  574.     kActionTextTrackMouseDown   = 12309,                        /* no params */
  575.     kActionTextTrackSetEditable = 12310,                        /* (short editState) */
  576.     kActionListAddElement       = 13312,                        /* (C string parentPath, long atIndex, C string newElementName) */
  577.     kActionListRemoveElements   = 13313,                        /* (C string parentPath, long startIndex, long endIndex) */
  578.     kActionListSetElementValue  = 13314,                        /* (C string elementPath, C string valueString) */
  579.     kActionListPasteFromXML     = 13315,                        /* (C string xml, C string targetParentPath, long startIndex) */
  580.     kActionListSetMatchingFromXML = 13316,                      /* (C string xml, C string targetParentPath) */
  581.     kActionListSetFromURL       = 13317,                        /* (C string url, C string targetParentPath ) */
  582.     kActionListExchangeLists    = 13318,                        /* (C string url, C string parentPath) */
  583.     kActionListServerQuery      = 13319                         /* (C string url, C string keyValuePairs, long flags, C string parentPath) */
  584. };
  585. enum {
  586.     kOperandExpression          = 1,
  587.     kOperandConstant            = 2,
  588.     kOperandSubscribedToChannel = 3,                            /* C string channelsURL */
  589.     kOperandUniqueCustomActionHandlerID = 4,
  590.     kOperandCustomActionHandlerIDIsOpen = 5,                    /* long ID */
  591.     kOperandConnectionSpeed     = 6,
  592.     kOperandGMTDay              = 7,
  593.     kOperandGMTMonth            = 8,
  594.     kOperandGMTYear             = 9,
  595.     kOperandGMTHours            = 10,
  596.     kOperandGMTMinutes          = 11,
  597.     kOperandGMTSeconds          = 12,
  598.     kOperandLocalDay            = 13,
  599.     kOperandLocalMonth          = 14,
  600.     kOperandLocalYear           = 15,
  601.     kOperandLocalHours          = 16,
  602.     kOperandLocalMinutes        = 17,
  603.     kOperandLocalSeconds        = 18,
  604.     kOperandRegisteredForQuickTimePro = 19,
  605.     kOperandPlatformRunningOn   = 20,
  606.     kOperandQuickTimeVersion    = 21,
  607.     kOperandComponentVersion    = 22,                           /* C string type, C string subType, C string manufacturer */
  608.     kOperandOriginalHandlerRefcon = 23,
  609.     kOperandTicks               = 24,
  610.     kOperandMaxLoadedTimeInMovie = 25,
  611.     kOperandEventParameter      = 26,                           /* short index */
  612.     kOperandFreeMemory          = 27,
  613.     kOperandNetworkStatus       = 28,
  614.     kOperandQuickTimeVersionRegistered = 29,                    /* long version */
  615.     kOperandSystemVersion       = 30,
  616.     kOperandMovieVolume         = 1024,
  617.     kOperandMovieRate           = 1025,
  618.     kOperandMovieIsLooping      = 1026,
  619.     kOperandMovieLoopIsPalindrome = 1027,
  620.     kOperandMovieTime           = 1028,
  621.     kOperandMovieDuration       = 1029,
  622.     kOperandMovieTimeScale      = 1030,
  623.     kOperandMovieWidth          = 1031,
  624.     kOperandMovieHeight         = 1032,
  625.     kOperandMovieLoadState      = 1033,
  626.     kOperandMovieTrackCount     = 1034,
  627.     kOperandMovieIsActive       = 1035,
  628.     kOperandMovieName           = 1036,
  629.     kOperandMovieID             = 1037,
  630.     kOperandMovieChapterCount   = 1038,
  631.     kOperandMovieChapterIndex   = 1039,
  632.     kOperandMovieChapterName    = 1040,
  633.     kOperandMovieChapterNameByIndex = 1041,                     /* ( short index ) */
  634.     kOperandMovieChapterIndexByName = 1042,                     /* (c string name)  */
  635.     kOperandMovieAnnotation     = 1043,                         /* (c string requested, long flags) */
  636.     kOperandMovieConnectionFlags = 1044,
  637.     kOperandMovieConnectionString = 1045,
  638.     kOperandTrackVolume         = 2048,
  639.     kOperandTrackBalance        = 2049,
  640.     kOperandTrackEnabled        = 2050,
  641.     kOperandTrackLayer          = 2051,
  642.     kOperandTrackWidth          = 2052,
  643.     kOperandTrackHeight         = 2053,
  644.     kOperandTrackDuration       = 2054,
  645.     kOperandTrackName           = 2055,
  646.     kOperandTrackID             = 2056,
  647.     kOperandTrackIdleFrequency  = 2057,
  648.     kOperandTrackBass           = 2058,
  649.     kOperandTrackTreble         = 2059,
  650.     kOperandSpriteBoundsLeft    = 3072,
  651.     kOperandSpriteBoundsTop     = 3073,
  652.     kOperandSpriteBoundsRight   = 3074,
  653.     kOperandSpriteBoundsBottom  = 3075,
  654.     kOperandSpriteImageIndex    = 3076,
  655.     kOperandSpriteVisible       = 3077,
  656.     kOperandSpriteLayer         = 3078,
  657.     kOperandSpriteTrackVariable = 3079,                         /* [QTAtomID variableID] */
  658.     kOperandSpriteTrackNumSprites = 3080,
  659.     kOperandSpriteTrackNumImages = 3081,
  660.     kOperandSpriteID            = 3082,
  661.     kOperandSpriteIndex         = 3083,
  662.     kOperandSpriteFirstCornerX  = 3084,
  663.     kOperandSpriteFirstCornerY  = 3085,
  664.     kOperandSpriteSecondCornerX = 3086,
  665.     kOperandSpriteSecondCornerY = 3087,
  666.     kOperandSpriteThirdCornerX  = 3088,
  667.     kOperandSpriteThirdCornerY  = 3089,
  668.     kOperandSpriteFourthCornerX = 3090,
  669.     kOperandSpriteFourthCornerY = 3091,
  670.     kOperandSpriteImageRegistrationPointX = 3092,
  671.     kOperandSpriteImageRegistrationPointY = 3093,
  672.     kOperandSpriteTrackSpriteIDAtPoint = 3094,                  /* short x, short y */
  673.     kOperandSpriteName          = 3095,
  674.     kOperandSpriteCanBeHitTested = 3105,                        /* short */
  675.     kOperandSpriteTrackAllSpritesHitTestingMode = 3106,
  676.     kOperandSpriteTrackImageIDByIndex = 3107,                   /* short imageIndex */
  677.     kOperandSpriteTrackImageIndexByID = 3108,                   /* QTAtomID */
  678.     kOperandQTVRPanAngle        = 4096,
  679.     kOperandQTVRTiltAngle       = 4097,
  680.     kOperandQTVRFieldOfView     = 4098,
  681.     kOperandQTVRNodeID          = 4099,
  682.     kOperandQTVRHotSpotsVisible = 4100,
  683.     kOperandQTVRViewCenterH     = 4101,
  684.     kOperandQTVRViewCenterV     = 4102,
  685.     kOperandQTVRViewStateCount  = 4103,
  686.     kOperandQTVRViewState       = 4104,                         /* long viewStateType */
  687.     kOperandMouseLocalHLoc      = 5120,                         /* [TargetAtoms aTrack] */
  688.     kOperandMouseLocalVLoc      = 5121,                         /* [TargetAtoms aTrack] */
  689.     kOperandKeyIsDown           = 5122,                         /* [short modKeys, char asciiValue] */
  690.     kOperandRandom              = 5123,                         /* [short min, short max] */
  691.     kOperandCanHaveFocus        = 5124,                         /* [(TargetAtoms theObject)] */
  692.     kOperandHasFocus            = 5125,                         /* [(TargetAtoms theObject)] */
  693.     kOperandTextTrackEditable   = 6144,
  694.     kOperandTextTrackCopyText   = 6145,                         /* long startSelection, long endSelection */
  695.     kOperandTextTrackStartSelection = 6146,
  696.     kOperandTextTrackEndSelection = 6147,
  697.     kOperandTextTrackTextBoxLeft = 6148,
  698.     kOperandTextTrackTextBoxTop = 6149,
  699.     kOperandTextTrackTextBoxRight = 6150,
  700.     kOperandTextTrackTextBoxBottom = 6151,
  701.     kOperandTextTrackTextLength = 6152,
  702.     kOperandListCountElements   = 7168,                         /* (C string parentPath) */
  703.     kOperandListGetElementPathByIndex = 7169,                   /* (C string parentPath, long index) */
  704.     kOperandListGetElementValue = 7170,                         /* (C string elementPath) */
  705.     kOperandListCopyToXML       = 7171,                         /* (C string parentPath, long startIndex, long endIndex) */
  706.     kOperandSin                 = 8192,                         /* float x    */
  707.     kOperandCos                 = 8193,                         /* float x    */
  708.     kOperandTan                 = 8194,                         /* float x    */
  709.     kOperandATan                = 8195,                         /* float x    */
  710.     kOperandATan2               = 8196,                         /* float y, float x   */
  711.     kOperandDegreesToRadians    = 8197,                         /* float x */
  712.     kOperandRadiansToDegrees    = 8198,                         /* float x */
  713.     kOperandSquareRoot          = 8199,                         /* float x */
  714.     kOperandExponent            = 8200,                         /* float x */
  715.     kOperandLog                 = 8201,                         /* float x */
  716.     kOperandFlashTrackVariable  = 9216,                         /* [CString path, CString name] */
  717.     kOperandStringLength        = 10240,                        /* (C string text) */
  718.     kOperandStringCompare       = 10241,                        /* (C string aText, C string bText, Boolean caseSensitive, Boolan diacSensitive) */
  719.     kOperandStringSubString     = 10242,                        /* (C string text, long offset, long length) */
  720.     kOperandStringConcat        = 10243                         /* (C string aText, C string bText) */
  721. };
  722. enum {
  723.     kFirstMovieAction           = kActionMovieSetVolume,
  724.     kLastMovieAction            = kActionMovieSetScale,
  725.     kFirstTrackAction           = kActionTrackSetVolume,
  726.     kLastTrackAction            = kActionTrackSetBassTreble,
  727.     kFirstSpriteAction          = kActionSpriteSetMatrix,
  728.     kLastSpriteAction           = kActionSpriteSetCanBeHitTested,
  729.     kFirstQTVRAction            = kActionQTVRSetPanAngle,
  730.     kLastQTVRAction             = kActionQTVRSetViewState,
  731.     kFirstMusicAction           = kActionMusicPlayNote,
  732.     kLastMusicAction            = kActionMusicSetController,
  733.     kFirstSystemAction          = kActionCase,
  734.     kLastSystemAction           = kActionSetRandomSeed,
  735.     kFirstSpriteTrackAction     = kActionSpriteTrackSetVariable,
  736.     kLastSpriteTrackAction      = kActionSpriteTrackDisposeImage,
  737.     kFirstApplicationAction     = kActionApplicationNumberAndString,
  738.     kLastApplicationAction      = kActionApplicationNumberAndString,
  739.     kFirstQD3DNamedObjectAction = kActionQD3DNamedObjectTranslateTo,
  740.     kLastQD3DNamedObjectAction  = kActionQD3DNamedObjectRotateTo,
  741.     kFirstFlashTrackAction      = kActionFlashTrackSetPan,
  742.     kLastFlashTrackAction       = kActionFlashTrackDoButtonActions,
  743.     kFirstMovieTrackAction      = kActionMovieTrackAddChildMovie,
  744.     kLastMovieTrackAction       = kActionMovieTrackLoadChildMovieWithQTListParams,
  745.     kFirstTextTrackAction       = kActionTextTrackPasteText,
  746.     kLastTextTrackAction        = kActionTextTrackSetEditable,
  747.     kFirstMultiTargetAction     = kActionListAddElement,
  748.     kLastMultiTargetAction      = kActionListServerQuery,
  749.     kFirstAction                = kFirstMovieAction,
  750.     kLastAction                 = kLastMultiTargetAction
  751. };
  752. /* target atom types*/
  753. enum {
  754.     kTargetMovie                = FOUR_CHAR_CODE('moov'),       /* no data */
  755.     kTargetMovieName            = FOUR_CHAR_CODE('mona'),       /* (PString movieName) */
  756.     kTargetMovieID              = FOUR_CHAR_CODE('moid'),       /* (long movieID) */
  757.     kTargetRootMovie            = FOUR_CHAR_CODE('moro'),       /* no data */
  758.     kTargetParentMovie          = FOUR_CHAR_CODE('mopa'),       /* no data */
  759.     kTargetChildMovieTrackName  = FOUR_CHAR_CODE('motn'),       /* (PString childMovieTrackName) */
  760.     kTargetChildMovieTrackID    = FOUR_CHAR_CODE('moti'),       /* (long childMovieTrackID) */
  761.     kTargetChildMovieTrackIndex = FOUR_CHAR_CODE('motx'),       /* (long childMovieTrackIndex) */
  762.     kTargetChildMovieMovieName  = FOUR_CHAR_CODE('momn'),       /* (PString childMovieName) */
  763.     kTargetChildMovieMovieID    = FOUR_CHAR_CODE('momi'),       /* (long childMovieID) */
  764.     kTargetTrackName            = FOUR_CHAR_CODE('trna'),       /* (PString trackName) */
  765.     kTargetTrackID              = FOUR_CHAR_CODE('trid'),       /* (long trackID) */
  766.     kTargetTrackType            = FOUR_CHAR_CODE('trty'),       /* (OSType trackType) */
  767.     kTargetTrackIndex           = FOUR_CHAR_CODE('trin'),       /* (long trackIndex) */
  768.     kTargetSpriteName           = FOUR_CHAR_CODE('spna'),       /* (PString spriteName) */
  769.     kTargetSpriteID             = FOUR_CHAR_CODE('spid'),       /* (QTAtomID spriteID) */
  770.     kTargetSpriteIndex          = FOUR_CHAR_CODE('spin'),       /* (short spriteIndex) */
  771.     kTargetQD3DNamedObjectName  = FOUR_CHAR_CODE('nana'),       /* (CString objectName) */
  772.     kTargetCurrentQTEventParams = FOUR_CHAR_CODE('evpa')        /* no data */
  773. };
  774. /* action container atom types*/
  775. enum {
  776.     kQTEventType                = FOUR_CHAR_CODE('evnt'),
  777.     kAction                     = FOUR_CHAR_CODE('actn'),
  778.     kWhichAction                = FOUR_CHAR_CODE('whic'),
  779.     kActionParameter            = FOUR_CHAR_CODE('parm'),
  780.     kActionTarget               = FOUR_CHAR_CODE('targ'),
  781.     kActionFlags                = FOUR_CHAR_CODE('flag'),
  782.     kActionParameterMinValue    = FOUR_CHAR_CODE('minv'),
  783.     kActionParameterMaxValue    = FOUR_CHAR_CODE('maxv'),
  784.     kActionListAtomType         = FOUR_CHAR_CODE('list'),
  785.     kExpressionContainerAtomType = FOUR_CHAR_CODE('expr'),
  786.     kConditionalAtomType        = FOUR_CHAR_CODE('test'),
  787.     kOperatorAtomType           = FOUR_CHAR_CODE('oper'),
  788.     kOperandAtomType            = FOUR_CHAR_CODE('oprn'),
  789.     kCommentAtomType            = FOUR_CHAR_CODE('why '),
  790.     kCustomActionHandler        = FOUR_CHAR_CODE('cust'),
  791.     kCustomHandlerID            = FOUR_CHAR_CODE('id  '),
  792.     kCustomHandlerDesc          = FOUR_CHAR_CODE('desc'),
  793.     kQTEventRecordAtomType      = FOUR_CHAR_CODE('erec')
  794. };
  795. /* QTEvent types */
  796. enum {
  797.     kQTEventMouseClick          = FOUR_CHAR_CODE('clik'),
  798.     kQTEventMouseClickEnd       = FOUR_CHAR_CODE('cend'),
  799.     kQTEventMouseClickEndTriggerButton = FOUR_CHAR_CODE('trig'),
  800.     kQTEventMouseEnter          = FOUR_CHAR_CODE('entr'),
  801.     kQTEventMouseExit           = FOUR_CHAR_CODE('exit'),
  802.     kQTEventMouseMoved          = FOUR_CHAR_CODE('move'),
  803.     kQTEventFrameLoaded         = FOUR_CHAR_CODE('fram'),
  804.     kQTEventIdle                = FOUR_CHAR_CODE('idle'),
  805.     kQTEventKey                 = FOUR_CHAR_CODE('key '),       /* qtevent.param1 = key, qtevent.param2 = modifiers, qtEvent.param3 = scanCode */
  806.     kQTEventMovieLoaded         = FOUR_CHAR_CODE('load'),
  807.     kQTEventRequestToModifyMovie = FOUR_CHAR_CODE('reqm'),
  808.     kQTEventListReceived        = FOUR_CHAR_CODE('list'),
  809.     kQTEventKeyUp               = FOUR_CHAR_CODE('keyU')        /* qtevent.param1 = key, qtevent.param2 = modifiers, qtEvent.param3 = scanCode */
  810. };
  811. /* flags for the kActionFlags atom */
  812. enum {
  813.     kActionFlagActionIsDelta    = 1L << 1,
  814.     kActionFlagParameterWrapsAround = 1L << 2,
  815.     kActionFlagActionIsToggle   = 1L << 3
  816. };
  817. /* flags for stringTypeFlags field of the QTStatusStringRecord */
  818. enum {
  819.     kStatusStringIsURLLink      = 1L << 1,
  820.     kStatusStringIsStreamingStatus = 1L << 2,
  821.     kStatusHasCodeNumber        = 1L << 3,                      /* high 16 bits of stringTypeFlags is error code number*/
  822.     kStatusIsError              = 1L << 4
  823. };
  824. /* flags for scriptTypeFlags field of the QTDoScriptRecord*/
  825. enum {
  826.     kScriptIsUnknownType        = 1L << 0,
  827.     kScriptIsJavaScript         = 1L << 1,
  828.     kScriptIsLingoEvent         = 1L << 2,
  829.     kScriptIsVBEvent            = 1L << 3,
  830.     kScriptIsProjectorCommand   = 1L << 4,
  831.     kScriptIsAppleScript        = 1L << 5
  832. };
  833. /* flags for CheckQuickTimeRegistration routine*/
  834. enum {
  835.     kQTRegistrationDialogTimeOutFlag = 1 << 0,
  836.     kQTRegistrationDialogShowDialog = 1 << 1,
  837.     kQTRegistrationDialogForceDialog = 1 << 2
  838. };
  839. /* constants for kOperatorAtomType IDs (operator types)*/
  840. enum {
  841.     kOperatorAdd                = FOUR_CHAR_CODE('add '),
  842.     kOperatorSubtract           = FOUR_CHAR_CODE('sub '),
  843.     kOperatorMultiply           = FOUR_CHAR_CODE('mult'),
  844.     kOperatorDivide             = FOUR_CHAR_CODE('div '),
  845.     kOperatorOr                 = FOUR_CHAR_CODE('or  '),
  846.     kOperatorAnd                = FOUR_CHAR_CODE('and '),
  847.     kOperatorNot                = FOUR_CHAR_CODE('not '),
  848.     kOperatorLessThan           = FOUR_CHAR_CODE('<   '),
  849.     kOperatorLessThanEqualTo    = FOUR_CHAR_CODE('<=  '),
  850.     kOperatorEqualTo            = FOUR_CHAR_CODE('=   '),
  851.     kOperatorNotEqualTo         = FOUR_CHAR_CODE('!=  '),
  852.     kOperatorGreaterThan        = FOUR_CHAR_CODE('>   '),
  853.     kOperatorGreaterThanEqualTo = FOUR_CHAR_CODE('>=  '),
  854.     kOperatorModulo             = FOUR_CHAR_CODE('mod '),
  855.     kOperatorIntegerDivide      = FOUR_CHAR_CODE('idiv'),
  856.     kOperatorAbsoluteValue      = FOUR_CHAR_CODE('abs '),
  857.     kOperatorNegate             = FOUR_CHAR_CODE('neg ')
  858. };
  859. /* constants for kOperandPlatformRunningOn*/
  860. enum {
  861.     kPlatformMacintosh          = 1,
  862.     kPlatformWindows            = 2
  863. };
  864. /* flags for kOperandSystemVersion*/
  865. enum {
  866.     kSystemIsWindows9x          = 0x00010000,
  867.     kSystemIsWindowsNT          = 0x00020000
  868. };
  869. /* constants for MediaPropertiesAtom*/
  870. enum {
  871.     kMediaPropertyNonLinearAtomType = FOUR_CHAR_CODE('nonl'),
  872.     kMediaPropertyHasActions    = 105
  873. };
  874. /* TimeBase equates */
  875. typedef long                            TimeValue;
  876. typedef long                            TimeScale;
  877. typedef wide                            CompTimeValue;
  878. typedef SInt64                          TimeValue64;
  879. enum {
  880.     loopTimeBase                = 1,
  881.     palindromeLoopTimeBase      = 2,
  882.     maintainTimeBaseZero        = 4
  883. };
  884. typedef unsigned long                   TimeBaseFlags;
  885. struct TimeBaseRecord {
  886.     long                            data[1];
  887. };
  888. typedef struct TimeBaseRecord           TimeBaseRecord;
  889. typedef TimeBaseRecord *                TimeBase;
  890. struct CallBackRecord {
  891.     long                            data[1];
  892. };
  893. typedef struct CallBackRecord           CallBackRecord;
  894. typedef CallBackRecord *                QTCallBack;
  895. struct TimeRecord {
  896.     CompTimeValue                   value;                      /* units */
  897.     TimeScale                       scale;                      /* units per second */
  898.     TimeBase                        base;
  899. };
  900. typedef struct TimeRecord               TimeRecord;
  901. /* CallBack equates */
  902. enum {
  903.     triggerTimeFwd              = 0x0001,                       /* when curTime exceeds triggerTime going forward */
  904.     triggerTimeBwd              = 0x0002,                       /* when curTime exceeds triggerTime going backwards */
  905.     triggerTimeEither           = 0x0003,                       /* when curTime exceeds triggerTime going either direction */
  906.     triggerRateLT               = 0x0004,                       /* when rate changes to less than trigger value */
  907.     triggerRateGT               = 0x0008,                       /* when rate changes to greater than trigger value */
  908.     triggerRateEqual            = 0x0010,                       /* when rate changes to equal trigger value */
  909.     triggerRateLTE              = triggerRateLT | triggerRateEqual,
  910.     triggerRateGTE              = triggerRateGT | triggerRateEqual,
  911.     triggerRateNotEqual         = triggerRateGT | triggerRateEqual | triggerRateLT,
  912.     triggerRateChange           = 0,
  913.     triggerAtStart              = 0x0001,
  914.     triggerAtStop               = 0x0002
  915. };
  916. typedef unsigned short                  QTCallBackFlags;
  917. enum {
  918.     timeBaseBeforeStartTime     = 1,
  919.     timeBaseAfterStopTime       = 2
  920. };
  921. typedef unsigned long                   TimeBaseStatus;
  922. enum {
  923.     callBackAtTime              = 1,
  924.     callBackAtRate              = 2,
  925.     callBackAtTimeJump          = 3,
  926.     callBackAtExtremes          = 4,
  927.     callBackAtTimeBaseDisposed  = 5,
  928.     callBackAtInterrupt         = 0x8000,
  929.     callBackAtDeferredTask      = 0x4000
  930. };
  931. typedef unsigned short                  QTCallBackType;
  932. typedef CALLBACK_API( void , QTCallBackProcPtr )(QTCallBack cb, long refCon);
  933. typedef STACK_UPP_TYPE(QTCallBackProcPtr)                       QTCallBackUPP;
  934. enum {
  935.     qtcbNeedsRateChanges        = 1,                            /* wants to know about rate changes */
  936.     qtcbNeedsTimeChanges        = 2,                            /* wants to know about time changes */
  937.     qtcbNeedsStartStopChanges   = 4                             /* wants to know when TimeBase start/stop is changed*/
  938. };
  939. struct QTCallBackHeader {
  940.     long                            callBackFlags;
  941.     long                            reserved1;
  942.     SInt8                           qtPrivate[40];
  943. };
  944. typedef struct QTCallBackHeader         QTCallBackHeader;
  945. typedef CALLBACK_API( void , QTSyncTaskProcPtr )(void *task);
  946. typedef STACK_UPP_TYPE(QTSyncTaskProcPtr)                       QTSyncTaskUPP;
  947. struct QTSyncTaskRecord {
  948.     void *                          qLink;
  949.     QTSyncTaskUPP                   proc;
  950. };
  951. typedef struct QTSyncTaskRecord         QTSyncTaskRecord;
  952. typedef QTSyncTaskRecord *              QTSyncTaskPtr;
  953. typedef CALLBACK_API( OSErr , MovieRgnCoverProcPtr )(Movie theMovie, RgnHandle changedRgn, long refcon);
  954. typedef CALLBACK_API( OSErr , MovieProgressProcPtr )(Movie theMovie, short message, short whatOperation, Fixed percentDone, long refcon);
  955. typedef CALLBACK_API( OSErr , MovieDrawingCompleteProcPtr )(Movie theMovie, long refCon);
  956. typedef CALLBACK_API( OSErr , TrackTransferProcPtr )(Track t, long refCon);
  957. typedef CALLBACK_API( OSErr , GetMovieProcPtr )(long offset, long size, void *dataPtr, void *refCon);
  958. typedef CALLBACK_API( Boolean , MoviePreviewCallOutProcPtr )(long refcon);
  959. typedef CALLBACK_API( OSErr , TextMediaProcPtr )(Handle theText, Movie theMovie, short *displayFlag, long refcon);
  960. typedef CALLBACK_API( OSErr , ActionsProcPtr )(void *refcon, Track targetTrack, long targetRefCon, QTEventRecordPtr theEvent);
  961. typedef CALLBACK_API( OSErr , DoMCActionProcPtr )(void *refcon, short action, void *params, Boolean *handled);
  962. typedef CALLBACK_API( OSErr , MovieExecuteWiredActionsProcPtr )(Movie theMovie, void *refcon, long flags, QTAtomContainer wiredActions);
  963. typedef CALLBACK_API( void , MoviePrePrerollCompleteProcPtr )(Movie theMovie, OSErr prerollErr, void *refcon);
  964. typedef CALLBACK_API( void , QTNextTaskNeededSoonerCallbackProcPtr )(TimeValue duration, unsigned long flags, void *refcon);
  965. typedef CALLBACK_API( void , MoviesErrorProcPtr )(OSErr theErr, long refcon);
  966. typedef STACK_UPP_TYPE(MovieRgnCoverProcPtr)                    MovieRgnCoverUPP;
  967. typedef STACK_UPP_TYPE(MovieProgressProcPtr)                    MovieProgressUPP;
  968. typedef STACK_UPP_TYPE(MovieDrawingCompleteProcPtr)             MovieDrawingCompleteUPP;
  969. typedef STACK_UPP_TYPE(TrackTransferProcPtr)                    TrackTransferUPP;
  970. typedef STACK_UPP_TYPE(GetMovieProcPtr)                         GetMovieUPP;
  971. typedef STACK_UPP_TYPE(MoviePreviewCallOutProcPtr)              MoviePreviewCallOutUPP;
  972. typedef STACK_UPP_TYPE(TextMediaProcPtr)                        TextMediaUPP;
  973. typedef STACK_UPP_TYPE(ActionsProcPtr)                          ActionsUPP;
  974. typedef STACK_UPP_TYPE(DoMCActionProcPtr)                       DoMCActionUPP;
  975. typedef STACK_UPP_TYPE(MovieExecuteWiredActionsProcPtr)         MovieExecuteWiredActionsUPP;
  976. typedef STACK_UPP_TYPE(MoviePrePrerollCompleteProcPtr)          MoviePrePrerollCompleteUPP;
  977. typedef STACK_UPP_TYPE(QTNextTaskNeededSoonerCallbackProcPtr)   QTNextTaskNeededSoonerCallbackUPP;
  978. typedef STACK_UPP_TYPE(MoviesErrorProcPtr)                      MoviesErrorUPP;
  979. typedef ComponentInstance               MediaHandler;
  980. typedef ComponentInstance               DataHandler;
  981. typedef Component                       MediaHandlerComponent;
  982. typedef Component                       DataHandlerComponent;
  983. typedef ComponentResult                 HandlerError;
  984. enum {
  985.     keepInRam                   = 1 << 0,                       /* load and make non-purgable*/
  986.     unkeepInRam                 = 1 << 1,                       /* mark as purgable*/
  987.     flushFromRam                = 1 << 2,                       /* empty those handles*/
  988.     loadForwardTrackEdits       = 1 << 3,                       /*    load track edits into ram for playing forward*/
  989.     loadBackwardTrackEdits      = 1 << 4                        /*    load track edits into ram for playing in reverse*/
  990. };
  991. enum {
  992.     newMovieActive              = 1 << 0,
  993.     newMovieDontResolveDataRefs = 1 << 1,
  994.     newMovieDontAskUnresolvedDataRefs = 1 << 2,
  995.     newMovieDontAutoAlternates  = 1 << 3,
  996.     newMovieDontUpdateForeBackPointers = 1 << 4,
  997.     newMovieDontAutoUpdateClock = 1 << 5,
  998.     newMovieAsyncOK             = 1 << 8,
  999.     newMovieIdleImportOK        = 1 << 10,
  1000.     newMovieDontInteractWithUser = 1 << 11
  1001. };
  1002. /* track usage bits */
  1003. enum {
  1004.     trackUsageInMovie           = 1 << 1,
  1005.     trackUsageInPreview         = 1 << 2,
  1006.     trackUsageInPoster          = 1 << 3
  1007. };
  1008. /* Add/GetMediaSample flags */
  1009. enum {
  1010.     mediaSampleNotSync          = 1 << 0,                       /* sample is not a sync sample (eg. is frame differenced */
  1011.     mediaSampleShadowSync       = 1 << 1                        /* sample is a shadow sync */
  1012. };
  1013. enum {
  1014.     pasteInParallel             = 1 << 0,
  1015.     showUserSettingsDialog      = 1 << 1,
  1016.     movieToFileOnlyExport       = 1 << 2,
  1017.     movieFileSpecValid          = 1 << 3
  1018. };
  1019. enum {
  1020.     nextTimeMediaSample         = 1 << 0,
  1021.     nextTimeMediaEdit           = 1 << 1,
  1022.     nextTimeTrackEdit           = 1 << 2,
  1023.     nextTimeSyncSample          = 1 << 3,
  1024.     nextTimeStep                = 1 << 4,
  1025.     nextTimeEdgeOK              = 1 << 14,
  1026.     nextTimeIgnoreActiveSegment = 1 << 15
  1027. };
  1028. typedef unsigned short                  nextTimeFlagsEnum;
  1029. enum {
  1030.     createMovieFileDeleteCurFile = 1L << 31,
  1031.     createMovieFileDontCreateMovie = 1L << 30,
  1032.     createMovieFileDontOpenFile = 1L << 29,
  1033.     createMovieFileDontCreateResFile = 1L << 28
  1034. };
  1035. typedef unsigned long                   createMovieFileFlagsEnum;
  1036. enum {
  1037.     flattenAddMovieToDataFork   = 1L << 0,
  1038.     flattenActiveTracksOnly     = 1L << 2,
  1039.     flattenDontInterleaveFlatten = 1L << 3,
  1040.     flattenFSSpecPtrIsDataRefRecordPtr = 1L << 4,
  1041.     flattenCompressMovieResource = 1L << 5,
  1042.     flattenForceMovieResourceBeforeMovieData = 1L << 6
  1043. };
  1044. typedef unsigned long                   movieFlattenFlagsEnum;
  1045. enum {
  1046.     movieInDataForkResID        = -1                            /* magic res ID */
  1047. };
  1048. enum {
  1049.     mcTopLeftMovie              = 1 << 0,                       /* usually centered */
  1050.     mcScaleMovieToFit           = 1 << 1,                       /* usually only scales down */
  1051.     mcWithBadge                 = 1 << 2,                       /* give me a badge */
  1052.     mcNotVisible                = 1 << 3,                       /* don't show controller */
  1053.     mcWithFrame                 = 1 << 4                        /* gimme a frame */
  1054. };
  1055. enum {
  1056.     movieScrapDontZeroScrap     = 1 << 0,
  1057.     movieScrapOnlyPutMovie      = 1 << 1
  1058. };
  1059. enum {
  1060.     dataRefSelfReference        = 1 << 0,
  1061.     dataRefWasNotResolved       = 1 << 1
  1062. };
  1063. typedef unsigned long                   dataRefAttributesFlags;
  1064. enum {
  1065.     kMovieAnchorDataRefIsDefault = 1 << 0                       /* data ref returned is movie default data ref */
  1066. };
  1067. enum {
  1068.     hintsScrubMode              = 1 << 0,                       /* mask == && (if flags == scrub on, flags != scrub off) */
  1069.     hintsLoop                   = 1 << 1,
  1070.     hintsDontPurge              = 1 << 2,
  1071.     hintsUseScreenBuffer        = 1 << 5,
  1072.     hintsAllowInterlace         = 1 << 6,
  1073.     hintsUseSoundInterp         = 1 << 7,
  1074.     hintsHighQuality            = 1 << 8,                       /* slooooow */
  1075.     hintsPalindrome             = 1 << 9,
  1076.     hintsInactive               = 1 << 11,
  1077.     hintsOffscreen              = 1 << 12,
  1078.     hintsDontDraw               = 1 << 13,
  1079.     hintsAllowBlacklining       = 1 << 14,
  1080.     hintsDontUseVideoOverlaySurface = 1 << 16,
  1081.     hintsIgnoreBandwidthRestrictions = 1 << 17,
  1082.     hintsPlayingEveryFrame      = 1 << 18,
  1083.     hintsAllowDynamicResize     = 1 << 19,
  1084.     hintsSingleField            = 1 << 20,
  1085.     hintsNoRenderingTimeOut     = 1 << 21,
  1086.     hintsFlushVideoInsteadOfDirtying = 1 << 22,
  1087.     hintsEnableSubPixelPositioning = 1L << 23
  1088. };
  1089. typedef unsigned long                   playHintsEnum;
  1090. enum {
  1091.     mediaHandlerFlagBaseClient  = 1
  1092. };
  1093. typedef unsigned long                   mediaHandlerFlagsEnum;
  1094. enum {
  1095.     movieTrackMediaType         = 1 << 0,
  1096.     movieTrackCharacteristic    = 1 << 1,
  1097.     movieTrackEnabledOnly       = 1 << 2
  1098. };
  1099. struct SampleReferenceRecord {
  1100.     long                            dataOffset;
  1101.     long                            dataSize;
  1102.     TimeValue                       durationPerSample;
  1103.     long                            numberOfSamples;
  1104.     short                           sampleFlags;
  1105. };
  1106. typedef struct SampleReferenceRecord    SampleReferenceRecord;
  1107. typedef SampleReferenceRecord *         SampleReferencePtr;
  1108. struct SampleReference64Record {
  1109.     wide                            dataOffset;
  1110.     unsigned long                   dataSize;
  1111.     TimeValue                       durationPerSample;
  1112.     unsigned long                   numberOfSamples;
  1113.     short                           sampleFlags;
  1114. };
  1115. typedef struct SampleReference64Record  SampleReference64Record;
  1116. typedef SampleReference64Record *       SampleReference64Ptr;
  1117. /*************************
  1118. * Initialization Routines 
  1119. **************************/
  1120. EXTERN_API( void )
  1121. CheckQuickTimeRegistration      (void *                 registrationKey,
  1122.                                  long                   flags)                              THREEWORDINLINE(0x303C, 0x02DA, 0xAAAA);
  1123. EXTERN_API( OSErr )
  1124. EnterMovies                     (void)                                                      TWOWORDINLINE(0x7001, 0xAAAA);
  1125. EXTERN_API( void )
  1126. ExitMovies                      (void)                                                      TWOWORDINLINE(0x7002, 0xAAAA);
  1127. /*************************
  1128. * Error Routines 
  1129. **************************/
  1130. EXTERN_API( OSErr )
  1131. GetMoviesError                  (void)                                                      TWOWORDINLINE(0x7003, 0xAAAA);
  1132. EXTERN_API( void )
  1133. ClearMoviesStickyError          (void)                                                      THREEWORDINLINE(0x303C, 0x00DE, 0xAAAA);
  1134. EXTERN_API( OSErr )
  1135. GetMoviesStickyError            (void)                                                      TWOWORDINLINE(0x7004, 0xAAAA);
  1136. EXTERN_API( void )
  1137. SetMoviesErrorProc              (MoviesErrorUPP         errProc,
  1138.                                  long                   refcon)                             THREEWORDINLINE(0x303C, 0x00EF, 0xAAAA);
  1139. /*************************
  1140. * Idle Routines 
  1141. **************************/
  1142. EXTERN_API( void )
  1143. MoviesTask                      (Movie                  theMovie,
  1144.                                  long                   maxMilliSecToUse)                   TWOWORDINLINE(0x7005, 0xAAAA);
  1145. EXTERN_API( OSErr )
  1146. PrerollMovie                    (Movie                  theMovie,
  1147.                                  TimeValue              time,
  1148.                                  Fixed                  Rate)                               TWOWORDINLINE(0x7006, 0xAAAA);
  1149. EXTERN_API( OSErr )
  1150. PrePrerollMovie                 (Movie                  m,
  1151.                                  TimeValue              time,
  1152.                                  Fixed                  rate,
  1153.                                  MoviePrePrerollCompleteUPP  proc,
  1154.                                  void *                 refcon)                             THREEWORDINLINE(0x303C, 0x02F7, 0xAAAA);
  1155. EXTERN_API( void )
  1156. AbortPrePrerollMovie            (Movie                  m,
  1157.                                  OSErr                  err)                                THREEWORDINLINE(0x303C, 0x02F8, 0xAAAA);
  1158. EXTERN_API( OSErr )
  1159. LoadMovieIntoRam                (Movie                  theMovie,
  1160.                                  TimeValue              time,
  1161.                                  TimeValue              duration,
  1162.                                  long                   flags)                              TWOWORDINLINE(0x7007, 0xAAAA);
  1163. EXTERN_API( OSErr )
  1164. LoadTrackIntoRam                (Track                  theTrack,
  1165.                                  TimeValue              time,
  1166.                                  TimeValue              duration,
  1167.                                  long                   flags)                              THREEWORDINLINE(0x303C, 0x016E, 0xAAAA);
  1168. EXTERN_API( OSErr )
  1169. LoadMediaIntoRam                (Media                  theMedia,
  1170.                                  TimeValue              time,
  1171.                                  TimeValue              duration,
  1172.                                  long                   flags)                              TWOWORDINLINE(0x7008, 0xAAAA);
  1173. EXTERN_API( void )
  1174. SetMovieActive                  (Movie                  theMovie,
  1175.                                  Boolean                active)                             TWOWORDINLINE(0x7009, 0xAAAA);
  1176. EXTERN_API( Boolean )
  1177. GetMovieActive                  (Movie                  theMovie)                           TWOWORDINLINE(0x700A, 0xAAAA);
  1178. EXTERN_API( OSErr )
  1179. QTGetWallClockTimeBase          (TimeBase *             wallClockTimeBase)                  THREEWORDINLINE(0x303C, 0x0347, 0xAAAA);
  1180. /*************************
  1181. * Idle Management
  1182. **************************/
  1183. typedef struct OpaqueIdleManager*       IdleManager;
  1184. EXTERN_API( IdleManager )
  1185. QTIdleManagerOpen               (void)                                                      THREEWORDINLINE(0x303C, 0x0348, 0xAAAA);
  1186. EXTERN_API( OSErr )
  1187. QTIdleManagerClose              (IdleManager            im)                                 THREEWORDINLINE(0x303C, 0x0349, 0xAAAA);
  1188. EXTERN_API( OSErr )
  1189. QTIdleManagerGetNextIdleTime    (IdleManager            im,
  1190.                                  TimeRecord *           nextIdle)                           THREEWORDINLINE(0x303C, 0x034A, 0xAAAA);
  1191. EXTERN_API( OSErr )
  1192. QTIdleManagerSetNextIdleTime    (IdleManager            im,
  1193.                                  TimeRecord *           nextIdle)                           THREEWORDINLINE(0x303C, 0x034B, 0xAAAA);
  1194. EXTERN_API( OSErr )
  1195. QTIdleManagerSetNextIdleTimeNever (IdleManager          im)                                 THREEWORDINLINE(0x303C, 0x0373, 0xAAAA);
  1196. EXTERN_API( OSErr )
  1197. QTIdleManagerSetNextIdleTimeNow (IdleManager            im)                                 THREEWORDINLINE(0x303C, 0x0374, 0xAAAA);
  1198. EXTERN_API( OSErr )
  1199. QTIdleManagerSetNextIdleTimeDelta (IdleManager          im,
  1200.                                  TimeValue              duration,
  1201.                                  TimeScale              scale)                              THREEWORDINLINE(0x303C, 0x0375, 0xAAAA);
  1202. EXTERN_API( OSErr )
  1203. QTIdleManagerSetParent          (IdleManager            im,
  1204.                                  IdleManager            parent)                             THREEWORDINLINE(0x303C, 0x034C, 0xAAAA);
  1205. EXTERN_API( OSErr )
  1206. QTIdleManagerNeedsAnIdle        (IdleManager            im,
  1207.                                  Boolean *              needsOne)                           THREEWORDINLINE(0x303C, 0x0371, 0xAAAA);
  1208. /*************************
  1209. * Carbon Movie Control
  1210. **************************/
  1211. /* Movie Control option bits*/
  1212. enum {
  1213.     kMovieControlOptionHideController = (1L << 0),
  1214.     kMovieControlOptionLocateTopLeft = (1L << 1),
  1215.     kMovieControlOptionEnableEditing = (1L << 2),
  1216.     kMovieControlOptionHandleEditingHI = (1L << 3),
  1217.     kMovieControlOptionSetKeysEnabled = (1L << 4),
  1218.     kMovieControlOptionManuallyIdled = (1L << 5)
  1219. };
  1220. /* Item tags for use in GetControlData() (some with SetControlData()) calls on Movie Controls*/
  1221. enum {
  1222.     kMovieControlDataMovieController = FOUR_CHAR_CODE('mc  '),
  1223.     kMovieControlDataMovie      = FOUR_CHAR_CODE('moov'),
  1224.     kMovieControlDataManualIdling = FOUR_CHAR_CODE('manu')
  1225. };
  1226. /*
  1227. ** CreateMovieControl() -   This is the public API routine that creates a Movie Control. Given a window and location
  1228. **                          plus a movie, it constructs a Movie Control with a Movie Controller in the window.
  1229. */
  1230. EXTERN_API( OSErr )
  1231. CreateMovieControl              (WindowRef              theWindow,
  1232.                                  Rect *                 localRect,
  1233.                                  Movie                  theMovie,
  1234.                                  UInt32                 options,
  1235.                                  ControlRef *           returnedControl)                    THREEWORDINLINE(0x303C, 0x0378, 0xAAAA);
  1236. /*************************
  1237. * calls for playing movies, previews, posters
  1238. **************************/
  1239. EXTERN_API( void )
  1240. StartMovie                      (Movie                  theMovie)                           TWOWORDINLINE(0x700B, 0xAAAA);
  1241. EXTERN_API( void )
  1242. StopMovie                       (Movie                  theMovie)                           TWOWORDINLINE(0x700C, 0xAAAA);
  1243. EXTERN_API( void )
  1244. GoToBeginningOfMovie            (Movie                  theMovie)                           TWOWORDINLINE(0x700D, 0xAAAA);
  1245. EXTERN_API( void )
  1246. GoToEndOfMovie                  (Movie                  theMovie)                           TWOWORDINLINE(0x700E, 0xAAAA);
  1247. EXTERN_API( Boolean )
  1248. IsMovieDone                     (Movie                  theMovie)                           THREEWORDINLINE(0x303C, 0x00DD, 0xAAAA);
  1249. EXTERN_API( Boolean )
  1250. GetMoviePreviewMode             (Movie                  theMovie)                           TWOWORDINLINE(0x700F, 0xAAAA);
  1251. EXTERN_API( void )
  1252. SetMoviePreviewMode             (Movie                  theMovie,
  1253.                                  Boolean                usePreview)                         TWOWORDINLINE(0x7010, 0xAAAA);
  1254. EXTERN_API( void )
  1255. ShowMoviePoster                 (Movie                  theMovie)                           TWOWORDINLINE(0x7011, 0xAAAA);
  1256. EXTERN_API( void )
  1257. PlayMoviePreview                (Movie                  theMovie,
  1258.                                  MoviePreviewCallOutUPP  callOutProc,
  1259.                                  long                   refcon)                             THREEWORDINLINE(0x303C, 0x00F2, 0xAAAA);
  1260. /*************************
  1261. * calls for controlling movies & tracks which are playing
  1262. **************************/
  1263. EXTERN_API( TimeBase )
  1264. GetMovieTimeBase                (Movie                  theMovie)                           TWOWORDINLINE(0x7012, 0xAAAA);
  1265. EXTERN_API( void )
  1266. SetMovieMasterTimeBase          (Movie                  theMovie,
  1267.                                  TimeBase               tb,
  1268.                                  const TimeRecord *     slaveZero)                          THREEWORDINLINE(0x303C, 0x0167, 0xAAAA);
  1269. EXTERN_API( void )
  1270. SetMovieMasterClock             (Movie                  theMovie,
  1271.                                  Component              clockMeister,
  1272.                                  const TimeRecord *     slaveZero)                          THREEWORDINLINE(0x303C, 0x0168, 0xAAAA);
  1273. EXTERN_API( void )
  1274. ChooseMovieClock                (Movie                  m,
  1275.                                  long                   flags)                              THREEWORDINLINE(0x303C, 0x0269, 0xAAAA);
  1276. EXTERN_API( void )
  1277. GetMovieGWorld                  (Movie                  theMovie,
  1278.                                  CGrafPtr *             port,
  1279.                                  GDHandle *             gdh)                                TWOWORDINLINE(0x7015, 0xAAAA);
  1280. EXTERN_API( void )
  1281. SetMovieGWorld                  (Movie                  theMovie,
  1282.                                  CGrafPtr               port,
  1283.                                  GDHandle               gdh)                                TWOWORDINLINE(0x7016, 0xAAAA);
  1284. enum {
  1285.     movieDrawingCallWhenChanged = 0,
  1286.     movieDrawingCallAlways      = 1
  1287. };
  1288. EXTERN_API( void )
  1289. SetMovieDrawingCompleteProc     (Movie                  theMovie,
  1290.                                  long                   flags,
  1291.                                  MovieDrawingCompleteUPP  proc,
  1292.                                  long                   refCon)                             THREEWORDINLINE(0x303C, 0x01DE, 0xAAAA);
  1293. EXTERN_API( void )
  1294. GetMovieNaturalBoundsRect       (Movie                  theMovie,
  1295.                                  Rect *                 naturalBounds)                      THREEWORDINLINE(0x303C, 0x022C, 0xAAAA);
  1296. EXTERN_API( Track )
  1297. GetNextTrackForCompositing      (Movie                  theMovie,
  1298.                                  Track                  theTrack)                           THREEWORDINLINE(0x303C, 0x01FA, 0xAAAA);
  1299. EXTERN_API( Track )
  1300. GetPrevTrackForCompositing      (Movie                  theMovie,
  1301.                                  Track                  theTrack)                           THREEWORDINLINE(0x303C, 0x01FB, 0xAAAA);
  1302. EXTERN_API( void )
  1303. SetTrackGWorld                  (Track                  theTrack,
  1304.                                  CGrafPtr               port,
  1305.                                  GDHandle               gdh,
  1306.                                  TrackTransferUPP       proc,
  1307.                                  long                   refCon)                             THREEWORDINLINE(0x303C, 0x009D, 0xAAAA);
  1308. EXTERN_API( PicHandle )
  1309. GetMoviePict                    (Movie                  theMovie,
  1310.                                  TimeValue              time)                               TWOWORDINLINE(0x701D, 0xAAAA);
  1311. EXTERN_API( PicHandle )
  1312. GetTrackPict                    (Track                  theTrack,
  1313.                                  TimeValue              time)                               TWOWORDINLINE(0x701E, 0xAAAA);
  1314. EXTERN_API( PicHandle )
  1315. GetMoviePosterPict              (Movie                  theMovie)                           THREEWORDINLINE(0x303C, 0x00F7, 0xAAAA);
  1316. /* called between Begin & EndUpdate */
  1317. EXTERN_API( OSErr )
  1318. UpdateMovie                     (Movie                  theMovie)                           TWOWORDINLINE(0x701F, 0xAAAA);
  1319. EXTERN_API( OSErr )
  1320. InvalidateMovieRegion           (Movie                  theMovie,
  1321.                                  RgnHandle              invalidRgn)                         THREEWORDINLINE(0x303C, 0x022A, 0xAAAA);
  1322. /**** spatial movie routines ****/
  1323. EXTERN_API( void )
  1324. GetMovieBox                     (Movie                  theMovie,
  1325.                                  Rect *                 boxRect)                            THREEWORDINLINE(0x303C, 0x00F9, 0xAAAA);
  1326. EXTERN_API( void )
  1327. SetMovieBox                     (Movie                  theMovie,
  1328.                                  const Rect *           boxRect)                            THREEWORDINLINE(0x303C, 0x00FA, 0xAAAA);
  1329. /** movie display clip */
  1330. EXTERN_API( RgnHandle )
  1331. GetMovieDisplayClipRgn          (Movie                  theMovie)                           THREEWORDINLINE(0x303C, 0x00FC, 0xAAAA);
  1332. EXTERN_API( void )
  1333. SetMovieDisplayClipRgn          (Movie                  theMovie,
  1334.                                  RgnHandle              theClip)                            THREEWORDINLINE(0x303C, 0x00FD, 0xAAAA);
  1335. /** movie src clip */
  1336. EXTERN_API( RgnHandle )
  1337. GetMovieClipRgn                 (Movie                  theMovie)                           THREEWORDINLINE(0x303C, 0x0100, 0xAAAA);
  1338. EXTERN_API( void )
  1339. SetMovieClipRgn                 (Movie                  theMovie,
  1340.                                  RgnHandle              theClip)                            THREEWORDINLINE(0x303C, 0x0101, 0xAAAA);
  1341. /** track src clip */
  1342. EXTERN_API( RgnHandle )
  1343. GetTrackClipRgn                 (Track                  theTrack)                           THREEWORDINLINE(0x303C, 0x0102, 0xAAAA);
  1344. EXTERN_API( void )
  1345. SetTrackClipRgn                 (Track                  theTrack,
  1346.                                  RgnHandle              theClip)                            THREEWORDINLINE(0x303C, 0x0103, 0xAAAA);
  1347. /** bounds in display space (not clipped by display clip) */
  1348. EXTERN_API( RgnHandle )
  1349. GetMovieDisplayBoundsRgn        (Movie                  theMovie)                           THREEWORDINLINE(0x303C, 0x00FB, 0xAAAA);
  1350. EXTERN_API( RgnHandle )
  1351. GetTrackDisplayBoundsRgn        (Track                  theTrack)                           THREEWORDINLINE(0x303C, 0x0112, 0xAAAA);
  1352. /** bounds in movie space */
  1353. EXTERN_API( RgnHandle )
  1354. GetMovieBoundsRgn               (Movie                  theMovie)                           THREEWORDINLINE(0x303C, 0x00FE, 0xAAAA);
  1355. EXTERN_API( RgnHandle )
  1356. GetTrackMovieBoundsRgn          (Track                  theTrack)                           THREEWORDINLINE(0x303C, 0x00FF, 0xAAAA);
  1357. /** bounds in track space */
  1358. EXTERN_API( RgnHandle )
  1359. GetTrackBoundsRgn               (Track                  theTrack)                           THREEWORDINLINE(0x303C, 0x0111, 0xAAAA);
  1360. /** mattes - always in track space */
  1361. EXTERN_API( PixMapHandle )
  1362. GetTrackMatte                   (Track                  theTrack)                           THREEWORDINLINE(0x303C, 0x0115, 0xAAAA);
  1363. EXTERN_API( void )
  1364. SetTrackMatte                   (Track                  theTrack,
  1365.                                  PixMapHandle           theMatte)                           THREEWORDINLINE(0x303C, 0x0116, 0xAAAA);
  1366. EXTERN_API( void )
  1367. DisposeMatte                    (PixMapHandle           theMatte)                           THREEWORDINLINE(0x303C, 0x014A, 0xAAAA);
  1368. /** video out */
  1369. EXTERN_API( void )
  1370. SetMovieVideoOutput             (Movie                  theMovie,
  1371.                                  ComponentInstance      vout)                               THREEWORDINLINE(0x303C, 0x0340, 0xAAAA);
  1372. /*************************
  1373. * calls for getting/saving movies
  1374. **************************/
  1375. EXTERN_API( Movie )
  1376. NewMovie                        (long                   flags)                              THREEWORDINLINE(0x303C, 0x0187, 0xAAAA);
  1377. EXTERN_API( OSErr )
  1378. PutMovieIntoHandle              (Movie                  theMovie,
  1379.                                  Handle                 publicMovie)                        TWOWORDINLINE(0x7022, 0xAAAA);
  1380. EXTERN_API( OSErr )
  1381. PutMovieIntoDataFork            (Movie                  theMovie,
  1382.                                  short                  fRefNum,
  1383.                                  long                   offset,
  1384.                                  long                   maxSize)                            THREEWORDINLINE(0x303C, 0x01B4, 0xAAAA);
  1385. EXTERN_API( OSErr )
  1386. PutMovieIntoDataFork64          (Movie                  theMovie,
  1387.                                  long                   fRefNum,
  1388.                                  const wide *           offset,
  1389.                                  unsigned long          maxSize)                            THREEWORDINLINE(0x303C, 0x02EA, 0xAAAA);
  1390. EXTERN_API( OSErr )
  1391. PutMovieIntoStorage             (Movie                  theMovie,
  1392.                                  DataHandler            dh,
  1393.                                  const wide *           offset,
  1394.                                  unsigned long          maxSize)                            THREEWORDINLINE(0x303C, 0x0391, 0xAAAA);
  1395. EXTERN_API( OSErr )
  1396. PutMovieForDataRefIntoHandle    (Movie                  theMovie,
  1397.                                  Handle                 dataRef,
  1398.                                  OSType                 dataRefType,
  1399.                                  Handle                 publicMovie)                        THREEWORDINLINE(0x303C, 0x0380, 0xAAAA);
  1400. EXTERN_API( void )
  1401. DisposeMovie                    (Movie                  theMovie)                           TWOWORDINLINE(0x7023, 0xAAAA);
  1402. /*************************
  1403. * Movie State Routines
  1404. **************************/
  1405. EXTERN_API( unsigned long )
  1406. GetMovieCreationTime            (Movie                  theMovie)                           TWOWORDINLINE(0x7026, 0xAAAA);
  1407. EXTERN_API( unsigned long )
  1408. GetMovieModificationTime        (Movie                  theMovie)                           TWOWORDINLINE(0x7027, 0xAAAA);
  1409. EXTERN_API( TimeScale )
  1410. GetMovieTimeScale               (Movie                  theMovie)                           TWOWORDINLINE(0x7029, 0xAAAA);
  1411. EXTERN_API( void )
  1412. SetMovieTimeScale               (Movie                  theMovie,
  1413.                                  TimeScale              timeScale)                          TWOWORDINLINE(0x702A, 0xAAAA);
  1414. EXTERN_API( TimeValue )
  1415. GetMovieDuration                (Movie                  theMovie)                           TWOWORDINLINE(0x702B, 0xAAAA);
  1416. EXTERN_API( Fixed )
  1417. GetMovieRate                    (Movie                  theMovie)                           TWOWORDINLINE(0x702C, 0xAAAA);
  1418. EXTERN_API( void )
  1419. SetMovieRate                    (Movie                  theMovie,
  1420.                                  Fixed                  rate)                               TWOWORDINLINE(0x702D, 0xAAAA);
  1421. EXTERN_API( Fixed )
  1422. GetMoviePreferredRate           (Movie                  theMovie)                           THREEWORDINLINE(0x303C, 0x00F3, 0xAAAA);
  1423. EXTERN_API( void )
  1424. SetMoviePreferredRate           (Movie                  theMovie,
  1425.                                  Fixed                  rate)                               THREEWORDINLINE(0x303C, 0x00F4, 0xAAAA);
  1426. EXTERN_API( short )
  1427. GetMoviePreferredVolume         (Movie                  theMovie)                           THREEWORDINLINE(0x303C, 0x00F5, 0xAAAA);
  1428. EXTERN_API( void )
  1429. SetMoviePreferredVolume         (Movie                  theMovie,
  1430.                                  short                  volume)                             THREEWORDINLINE(0x303C, 0x00F6, 0xAAAA);
  1431. EXTERN_API( short )
  1432. GetMovieVolume                  (Movie                  theMovie)                           TWOWORDINLINE(0x702E, 0xAAAA);
  1433. EXTERN_API( void )
  1434. SetMovieVolume                  (Movie                  theMovie,
  1435.                                  short                  volume)                             TWOWORDINLINE(0x702F, 0xAAAA);
  1436. EXTERN_API( void )
  1437. GetMovieMatrix                  (Movie                  theMovie,
  1438.                                  MatrixRecord *         matrix)                             TWOWORDINLINE(0x7031, 0xAAAA);
  1439. EXTERN_API( void )
  1440. SetMovieMatrix                  (Movie                  theMovie,
  1441.                                  const MatrixRecord *   matrix)                             TWOWORDINLINE(0x7032, 0xAAAA);
  1442. EXTERN_API( void )
  1443. GetMoviePreviewTime             (Movie                  theMovie,
  1444.                                  TimeValue *            previewTime,
  1445.                                  TimeValue *            previewDuration)                    TWOWORDINLINE(0x7033, 0xAAAA);
  1446. EXTERN_API( void )
  1447. SetMoviePreviewTime             (Movie                  theMovie,
  1448.                                  TimeValue              previewTime,
  1449.                                  TimeValue              previewDuration)                    TWOWORDINLINE(0x7034, 0xAAAA);
  1450. EXTERN_API( TimeValue )
  1451. GetMoviePosterTime              (Movie                  theMovie)                           TWOWORDINLINE(0x7035, 0xAAAA);
  1452. EXTERN_API( void )
  1453. SetMoviePosterTime              (Movie                  theMovie,
  1454.                                  TimeValue              posterTime)                         TWOWORDINLINE(0x7036, 0xAAAA);
  1455. EXTERN_API( void )
  1456. GetMovieSelection               (Movie                  theMovie,
  1457.                                  TimeValue *            selectionTime,
  1458.                                  TimeValue *            selectionDuration)                  TWOWORDINLINE(0x7037, 0xAAAA);
  1459. EXTERN_API( void )
  1460. SetMovieSelection               (Movie                  theMovie,
  1461.                                  TimeValue              selectionTime,
  1462.                                  TimeValue              selectionDuration)                  TWOWORDINLINE(0x7038, 0xAAAA);
  1463. EXTERN_API( void )
  1464. SetMovieActiveSegment           (Movie                  theMovie,
  1465.                                  TimeValue              startTime,
  1466.                                  TimeValue              duration)                           THREEWORDINLINE(0x303C, 0x015C, 0xAAAA);
  1467. EXTERN_API( void )
  1468. GetMovieActiveSegment           (Movie                  theMovie,
  1469.                                  TimeValue *            startTime,
  1470.                                  TimeValue *            duration)                           THREEWORDINLINE(0x303C, 0x015D, 0xAAAA);
  1471. EXTERN_API( TimeValue )
  1472. GetMovieTime                    (Movie                  theMovie,
  1473.                                  TimeRecord *           currentTime)                        TWOWORDINLINE(0x7039, 0xAAAA);
  1474. EXTERN_API( void )
  1475. SetMovieTime                    (Movie                  theMovie,
  1476.                                  const TimeRecord *     newtime)                            TWOWORDINLINE(0x703C, 0xAAAA);
  1477. EXTERN_API( void )
  1478. SetMovieTimeValue               (Movie                  theMovie,
  1479.                                  TimeValue              newtime)                            TWOWORDINLINE(0x703D, 0xAAAA);
  1480. EXTERN_API( UserData )
  1481. GetMovieUserData                (Movie                  theMovie)                           TWOWORDINLINE(0x703E, 0xAAAA);
  1482. EXTERN_API( OSErr )
  1483. QTGetTimeUntilNextTask          (long *                 duration,
  1484.                                  long                   scale)                              THREEWORDINLINE(0x303C, 0x036F, 0xAAAA);
  1485. EXTERN_API( OSErr )
  1486. QTInstallNextTaskNeededSoonerCallback (QTNextTaskNeededSoonerCallbackUPP  callbackProc,
  1487.                                  TimeScale              scale,
  1488.                                  unsigned long          flags,
  1489.                                  void *                 refcon)                             THREEWORDINLINE(0x303C, 0x0376, 0xAAAA);
  1490. EXTERN_API( OSErr )
  1491. QTUninstallNextTaskNeededSoonerCallback (QTNextTaskNeededSoonerCallbackUPP  callbackProc,
  1492.                                  void *                 refcon)                             THREEWORDINLINE(0x303C, 0x0377, 0xAAAA);
  1493. /*************************
  1494. * Track/Media finding routines
  1495. **************************/
  1496. EXTERN_API( long )
  1497. GetMovieTrackCount              (Movie                  theMovie)                           TWOWORDINLINE(0x703F, 0xAAAA);
  1498. EXTERN_API( Track )
  1499. GetMovieTrack                   (Movie                  theMovie,
  1500.                                  long                   trackID)                            TWOWORDINLINE(0x7040, 0xAAAA);
  1501. EXTERN_API( Track )
  1502. GetMovieIndTrack                (Movie                  theMovie,
  1503.                                  long                   index)                              THREEWORDINLINE(0x303C, 0x0117, 0xAAAA);
  1504. EXTERN_API( Track )
  1505. GetMovieIndTrackType            (Movie                  theMovie,
  1506.                                  long                   index,
  1507.                                  OSType                 trackType,
  1508.                                  long                   flags)                              THREEWORDINLINE(0x303C, 0x0208, 0xAAAA);
  1509. EXTERN_API( long )
  1510. GetTrackID                      (Track                  theTrack)                           THREEWORDINLINE(0x303C, 0x0127, 0xAAAA);
  1511. EXTERN_API( Movie )
  1512. GetTrackMovie                   (Track                  theTrack)                           THREEWORDINLINE(0x303C, 0x00D0, 0xAAAA);
  1513. /*************************
  1514. * Track creation routines
  1515. **************************/
  1516. EXTERN_API( Track )
  1517. NewMovieTrack                   (Movie                  theMovie,
  1518.                                  Fixed                  width,
  1519.                                  Fixed                  height,
  1520.                                  short                  trackVolume)                        THREEWORDINLINE(0x303C, 0x0188, 0xAAAA);
  1521. EXTERN_API( void )
  1522. DisposeMovieTrack               (Track                  theTrack)                           TWOWORDINLINE(0x7042, 0xAAAA);
  1523. /*************************
  1524. * Track State routines
  1525. **************************/
  1526. EXTERN_API( unsigned long )
  1527. GetTrackCreationTime            (Track                  theTrack)                           TWOWORDINLINE(0x7043, 0xAAAA);
  1528. EXTERN_API( unsigned long )
  1529. GetTrackModificationTime        (Track                  theTrack)                           TWOWORDINLINE(0x7044, 0xAAAA);
  1530. EXTERN_API( Boolean )
  1531. GetTrackEnabled                 (Track                  theTrack)                           TWOWORDINLINE(0x7045, 0xAAAA);
  1532. EXTERN_API( void )
  1533. SetTrackEnabled                 (Track                  theTrack,
  1534.                                  Boolean                isEnabled)                          TWOWORDINLINE(0x7046, 0xAAAA);
  1535. EXTERN_API( long )
  1536. GetTrackUsage                   (Track                  theTrack)                           TWOWORDINLINE(0x7047, 0xAAAA);
  1537. EXTERN_API( void )
  1538. SetTrackUsage                   (Track                  theTrack,
  1539.                                  long                   usage)                              TWOWORDINLINE(0x7048, 0xAAAA);
  1540. EXTERN_API( TimeValue )
  1541. GetTrackDuration                (Track                  theTrack)                           TWOWORDINLINE(0x704B, 0xAAAA);
  1542. EXTERN_API( TimeValue )
  1543. GetTrackOffset                  (Track                  theTrack)                           TWOWORDINLINE(0x704C, 0xAAAA);
  1544. EXTERN_API( void )
  1545. SetTrackOffset                  (Track                  theTrack,
  1546.                                  TimeValue              movieOffsetTime)                    TWOWORDINLINE(0x704D, 0xAAAA);
  1547. EXTERN_API( short )
  1548. GetTrackLayer                   (Track                  theTrack)                           TWOWORDINLINE(0x7050, 0xAAAA);
  1549. EXTERN_API( void )
  1550. SetTrackLayer                   (Track                  theTrack,
  1551.                                  short                  layer)                              TWOWORDINLINE(0x7051, 0xAAAA);
  1552. EXTERN_API( Track )
  1553. GetTrackAlternate               (Track                  theTrack)                           TWOWORDINLINE(0x7052, 0xAAAA);
  1554. EXTERN_API( void )
  1555. SetTrackAlternate               (Track                  theTrack,
  1556.                                  Track                  alternateT)                         TWOWORDINLINE(0x7053, 0xAAAA);
  1557. EXTERN_API( void )
  1558. SetAutoTrackAlternatesEnabled   (Movie                  theMovie,
  1559.                                  Boolean                enable)                             THREEWORDINLINE(0x303C, 0x015E, 0xAAAA);
  1560. EXTERN_API( void )
  1561. SelectMovieAlternates           (Movie                  theMovie)                           THREEWORDINLINE(0x303C, 0x015F, 0xAAAA);
  1562. EXTERN_API( short )
  1563. GetTrackVolume                  (Track                  theTrack)                           TWOWORDINLINE(0x7054, 0xAAAA);
  1564. EXTERN_API( void )
  1565. SetTrackVolume                  (Track                  theTrack,
  1566.                                  short                  volume)                             TWOWORDINLINE(0x7055, 0xAAAA);
  1567. EXTERN_API( void )
  1568. GetTrackMatrix                  (Track                  theTrack,
  1569.                                  MatrixRecord *         matrix)                             TWOWORDINLINE(0x7056, 0xAAAA);
  1570. EXTERN_API( void )
  1571. SetTrackMatrix                  (Track                  theTrack,
  1572.                                  const MatrixRecord *   matrix)                             TWOWORDINLINE(0x7057, 0xAAAA);
  1573. EXTERN_API( void )
  1574. GetTrackDimensions              (Track                  theTrack,
  1575.                                  Fixed *                width,
  1576.                                  Fixed *                height)                             TWOWORDINLINE(0x705D, 0xAAAA);
  1577. EXTERN_API( void )
  1578. SetTrackDimensions              (Track                  theTrack,
  1579.                                  Fixed                  width,
  1580.                                  Fixed                  height)                             TWOWORDINLINE(0x705E, 0xAAAA);
  1581. EXTERN_API( UserData )
  1582. GetTrackUserData                (Track                  theTrack)                           TWOWORDINLINE(0x705F, 0xAAAA);
  1583. EXTERN_API( OSErr )
  1584. GetTrackDisplayMatrix           (Track                  theTrack,
  1585.                                  MatrixRecord *         matrix)                             THREEWORDINLINE(0x303C, 0x0263, 0xAAAA);
  1586. EXTERN_API( OSErr )
  1587. GetTrackSoundLocalizationSettings (Track                theTrack,
  1588.                                  Handle *               settings)                           THREEWORDINLINE(0x303C, 0x0282, 0xAAAA);
  1589. EXTERN_API( OSErr )
  1590. SetTrackSoundLocalizationSettings (Track                theTrack,
  1591.                                  Handle                 settings)                           THREEWORDINLINE(0x303C, 0x0283, 0xAAAA);
  1592. /*************************
  1593. * get Media routines
  1594. **************************/
  1595. EXTERN_API( Media )
  1596. NewTrackMedia                   (Track                  theTrack,
  1597.                                  OSType                 mediaType,
  1598.                                  TimeScale              timeScale,
  1599.                                  Handle                 dataRef,
  1600.                                  OSType                 dataRefType)                        THREEWORDINLINE(0x303C, 0x018E, 0xAAAA);
  1601. EXTERN_API( void )
  1602. DisposeTrackMedia               (Media                  theMedia)                           TWOWORDINLINE(0x7061, 0xAAAA);
  1603. EXTERN_API( Media )
  1604. GetTrackMedia                   (Track                  theTrack)                           TWOWORDINLINE(0x7062, 0xAAAA);
  1605. EXTERN_API( Track )
  1606. GetMediaTrack                   (Media                  theMedia)                           THREEWORDINLINE(0x303C, 0x00C5, 0xAAAA);
  1607. /*************************
  1608. * Media State routines
  1609. **************************/
  1610. EXTERN_API( unsigned long )
  1611. GetMediaCreationTime            (Media                  theMedia)                           TWOWORDINLINE(0x7066, 0xAAAA);
  1612. EXTERN_API( unsigned long )
  1613. GetMediaModificationTime        (Media                  theMedia)                           TWOWORDINLINE(0x7067, 0xAAAA);
  1614. EXTERN_API( TimeScale )
  1615. GetMediaTimeScale               (Media                  theMedia)                           TWOWORDINLINE(0x7068, 0xAAAA);
  1616. EXTERN_API( void )
  1617. SetMediaTimeScale               (Media                  theMedia,
  1618.                                  TimeScale              timeScale)                          TWOWORDINLINE(0x7069, 0xAAAA);
  1619. EXTERN_API( TimeValue )
  1620. GetMediaDuration                (Media                  theMedia)                           TWOWORDINLINE(0x706A, 0xAAAA);
  1621. EXTERN_API( short )
  1622. GetMediaLanguage                (Media                  theMedia)                           TWOWORDINLINE(0x706B, 0xAAAA);
  1623. EXTERN_API( void )
  1624. SetMediaLanguage                (Media                  theMedia,
  1625.                                  short                  language)                           TWOWORDINLINE(0x706C, 0xAAAA);
  1626. EXTERN_API( short )
  1627. GetMediaQuality                 (Media                  theMedia)                           TWOWORDINLINE(0x706D, 0xAAAA);
  1628. EXTERN_API( void )
  1629. SetMediaQuality                 (Media                  theMedia,
  1630.                                  short                  quality)                            TWOWORDINLINE(0x706E, 0xAAAA);
  1631. EXTERN_API( void )
  1632. GetMediaHandlerDescription      (Media                  theMedia,
  1633.                                  OSType *               mediaType,
  1634.                                  Str255                 creatorName,
  1635.                                  OSType *               creatorManufacturer)                TWOWORDINLINE(0x706F, 0xAAAA);
  1636. EXTERN_API( UserData )
  1637. GetMediaUserData                (Media                  theMedia)                           TWOWORDINLINE(0x7070, 0xAAAA);
  1638. EXTERN_API( OSErr )
  1639. GetMediaInputMap                (Media                  theMedia,
  1640.                                  QTAtomContainer *      inputMap)                           THREEWORDINLINE(0x303C, 0x0249, 0xAAAA);
  1641. EXTERN_API( OSErr )
  1642. SetMediaInputMap                (Media                  theMedia,
  1643.                                  QTAtomContainer        inputMap)                           THREEWORDINLINE(0x303C, 0x024A, 0xAAAA);
  1644. /*************************
  1645. * Media Handler routines
  1646. **************************/
  1647. EXTERN_API( MediaHandler )
  1648. GetMediaHandler                 (Media                  theMedia)                           TWOWORDINLINE(0x7071, 0xAAAA);
  1649. EXTERN_API( OSErr )
  1650. SetMediaHandler                 (Media                  theMedia,
  1651.                                  MediaHandlerComponent  mH)                                 THREEWORDINLINE(0x303C, 0x0190, 0xAAAA);
  1652. /*************************
  1653. * Media's Data routines
  1654. **************************/
  1655. EXTERN_API( OSErr )
  1656. BeginMediaEdits                 (Media                  theMedia)                           TWOWORDINLINE(0x7072, 0xAAAA);
  1657. EXTERN_API( OSErr )
  1658. EndMediaEdits                   (Media                  theMedia)                           TWOWORDINLINE(0x7073, 0xAAAA);
  1659. EXTERN_API( OSErr )
  1660. SetMediaDefaultDataRefIndex     (Media                  theMedia,
  1661.                                  short                  index)                              THREEWORDINLINE(0x303C, 0x01E0, 0xAAAA);
  1662. EXTERN_API( void )
  1663. GetMediaDataHandlerDescription  (Media                  theMedia,
  1664.                                  short                  index,
  1665.                                  OSType *               dhType,
  1666.                                  Str255                 creatorName,
  1667.                                  OSType *               creatorManufacturer)                THREEWORDINLINE(0x303C, 0x019E, 0xAAAA);
  1668. EXTERN_API( DataHandler )
  1669. GetMediaDataHandler             (Media                  theMedia,
  1670.                                  short                  index)                              THREEWORDINLINE(0x303C, 0x019F, 0xAAAA);
  1671. EXTERN_API( OSErr )
  1672. SetMediaDataHandler             (Media                  theMedia,
  1673.                                  short                  index,
  1674.                                  DataHandlerComponent   dataHandler)                        THREEWORDINLINE(0x303C, 0x01A0, 0xAAAA);
  1675. EXTERN_API( Component )
  1676. GetDataHandler                  (Handle                 dataRef,
  1677.                                  OSType                 dataHandlerSubType,
  1678.                                  long                   flags)                              THREEWORDINLINE(0x303C, 0x01ED, 0xAAAA);
  1679. EXTERN_API( OSErr )
  1680. OpenADataHandler                (Handle                 dataRef,
  1681.                                  OSType                 dataHandlerSubType,
  1682.                                  Handle                 anchorDataRef,
  1683.                                  OSType                 anchorDataRefType,
  1684.                                  TimeBase               tb,
  1685.                                  long                   flags,
  1686.                                  ComponentInstance *    dh)                                 THREEWORDINLINE(0x303C, 0x031C, 0xAAAA);
  1687. /*************************
  1688. * Media Sample Table Routines
  1689. **************************/
  1690. EXTERN_API( long )
  1691. GetMediaSampleDescriptionCount  (Media                  theMedia)                           TWOWORDINLINE(0x7077, 0xAAAA);
  1692. EXTERN_API( void )
  1693. GetMediaSampleDescription       (Media                  theMedia,
  1694.                                  long                   index,
  1695.                                  SampleDescriptionHandle  descH)                            TWOWORDINLINE(0x7078, 0xAAAA);
  1696. EXTERN_API( OSErr )
  1697. SetMediaSampleDescription       (Media                  theMedia,
  1698.                                  long                   index,
  1699.                                  SampleDescriptionHandle  descH)                            THREEWORDINLINE(0x303C, 0x01D0, 0xAAAA);
  1700. EXTERN_API( long )
  1701. GetMediaSampleCount             (Media                  theMedia)                           TWOWORDINLINE(0x7079, 0xAAAA);
  1702. EXTERN_API( long )
  1703. GetMediaSyncSampleCount         (Media                  theMedia)                           THREEWORDINLINE(0x303C, 0x02B2, 0xAAAA);
  1704. EXTERN_API( void )
  1705. SampleNumToMediaTime            (Media                  theMedia,
  1706.                                  long                   logicalSampleNum,
  1707.                                  TimeValue *            sampleTime,
  1708.                                  TimeValue *            sampleDuration)                     TWOWORDINLINE(0x707A, 0xAAAA);
  1709. EXTERN_API( void )
  1710. MediaTimeToSampleNum            (Media                  theMedia,
  1711.                                  TimeValue              time,
  1712.                                  long *                 sampleNum,
  1713.                                  TimeValue *            sampleTime,
  1714.                                  TimeValue *            sampleDuration)                     TWOWORDINLINE(0x707B, 0xAAAA);
  1715. EXTERN_API( OSErr )
  1716. AddMediaSample                  (Media                  theMedia,
  1717.                                  Handle                 dataIn,
  1718.                                  long                   inOffset,
  1719.                                  unsigned long          size,
  1720.                                  TimeValue              durationPerSample,
  1721.                                  SampleDescriptionHandle  sampleDescriptionH,
  1722.                                  long                   numberOfSamples,
  1723.                                  short                  sampleFlags,
  1724.                                  TimeValue *            sampleTime)                         TWOWORDINLINE(0x707C, 0xAAAA);
  1725. EXTERN_API( OSErr )
  1726. AddMediaSampleReference         (Media                  theMedia,
  1727.                                  long                   dataOffset,
  1728.                                  unsigned long          size,
  1729.                                  TimeValue              durationPerSample,
  1730.                                  SampleDescriptionHandle  sampleDescriptionH,
  1731.                                  long                   numberOfSamples,
  1732.                                  short                  sampleFlags,
  1733.                                  TimeValue *            sampleTime)                         TWOWORDINLINE(0x707D, 0xAAAA);
  1734. EXTERN_API( OSErr )
  1735. AddMediaSampleReferences        (Media                  theMedia,
  1736.                                  SampleDescriptionHandle  sampleDescriptionH,
  1737.                                  long                   numberOfSamples,
  1738.                                  SampleReferencePtr     sampleRefs,
  1739.                                  TimeValue *            sampleTime)                         THREEWORDINLINE(0x303C, 0x01F7, 0xAAAA);
  1740. EXTERN_API( OSErr )
  1741. AddMediaSampleReferences64      (Media                  theMedia,
  1742.                                  SampleDescriptionHandle  sampleDescriptionH,
  1743.                                  long                   numberOfSamples,
  1744.                                  SampleReference64Ptr   sampleRefs,
  1745.                                  TimeValue *            sampleTime)                         THREEWORDINLINE(0x303C, 0x02E8, 0xAAAA);
  1746. EXTERN_API( OSErr )
  1747. GetMediaSample                  (Media                  theMedia,
  1748.                                  Handle                 dataOut,
  1749.                                  long                   maxSizeToGrow,
  1750.                                  long *                 size,
  1751.                                  TimeValue              time,
  1752.                                  TimeValue *            sampleTime,
  1753.                                  TimeValue *            durationPerSample,
  1754.                                  SampleDescriptionHandle  sampleDescriptionH,
  1755.                                  long *                 sampleDescriptionIndex,
  1756.                                  long                   maxNumberOfSamples,
  1757.                                  long *                 numberOfSamples,
  1758.                                  short *                sampleFlags)                        TWOWORDINLINE(0x707E, 0xAAAA);
  1759. EXTERN_API( OSErr )
  1760. GetMediaSampleReference         (Media                  theMedia,
  1761.                                  long *                 dataOffset,
  1762.                                  long *                 size,
  1763.                                  TimeValue              time,
  1764.                                  TimeValue *            sampleTime,
  1765.                                  TimeValue *            durationPerSample,
  1766.                                  SampleDescriptionHandle  sampleDescriptionH,
  1767.                                  long *                 sampleDescriptionIndex,
  1768.                                  long                   maxNumberOfSamples,
  1769.                                  long *                 numberOfSamples,
  1770.                                  short *                sampleFlags)                        TWOWORDINLINE(0x707F, 0xAAAA);
  1771. EXTERN_API( OSErr )
  1772. GetMediaSampleReferences        (Media                  theMedia,
  1773.                                  TimeValue              time,
  1774.                                  TimeValue *            sampleTime,
  1775.                                  SampleDescriptionHandle  sampleDescriptionH,
  1776.                                  long *                 sampleDescriptionIndex,
  1777.                                  long                   maxNumberOfEntries,
  1778.                                  long *                 actualNumberofEntries,
  1779.                                  SampleReferencePtr     sampleRefs)                         THREEWORDINLINE(0x303C, 0x0235, 0xAAAA);
  1780. EXTERN_API( OSErr )
  1781. GetMediaSampleReferences64      (Media                  theMedia,
  1782.                                  TimeValue              time,
  1783.                                  TimeValue *            sampleTime,
  1784.                                  SampleDescriptionHandle  sampleDescriptionH,
  1785.                                  long *                 sampleDescriptionIndex,
  1786.                                  long                   maxNumberOfEntries,
  1787.                                  long *                 actualNumberofEntries,
  1788.                                  SampleReference64Ptr   sampleRefs)                         THREEWORDINLINE(0x303C, 0x02E9, 0xAAAA);
  1789. EXTERN_API( OSErr )
  1790. SetMediaPreferredChunkSize      (Media                  theMedia,
  1791.                                  long                   maxChunkSize)                       THREEWORDINLINE(0x303C, 0x01F8, 0xAAAA);
  1792. EXTERN_API( OSErr )
  1793. GetMediaPreferredChunkSize      (Media                  theMedia,
  1794.                                  long *                 maxChunkSize)                       THREEWORDINLINE(0x303C, 0x01F9, 0xAAAA);
  1795. EXTERN_API( OSErr )
  1796. SetMediaShadowSync              (Media                  theMedia,
  1797.                                  long                   frameDiffSampleNum,
  1798.                                  long                   syncSampleNum)                      THREEWORDINLINE(0x303C, 0x0121, 0xAAAA);
  1799. EXTERN_API( OSErr )
  1800. GetMediaShadowSync              (Media                  theMedia,