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

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       MovieManager.h
  3.  
  4.      Contains:   Interface for MovieManager component
  5.  
  6.      Version:    Technology: QuickTime 4.2
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 2000-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 __MOVIEMANAGER__
  18. #define __MOVIEMANAGER__
  19. #ifndef __MOVIES__
  20. #include "Movies.h"
  21. #endif
  22. #ifndef __QUICKTIMEVR__
  23. #include "QuickTimeVR.h"
  24. #endif
  25. #ifndef __COMPONENTS__
  26. #include "Components.h"
  27. #endif
  28. #ifndef __EVENTS__
  29. #include "Events.h"
  30. #endif
  31. #ifndef __MACTYPES__
  32. #include "MacTypes.h"
  33. #endif
  34. #ifndef __MACWINDOWS__
  35. #include "MacWindows.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. typedef ComponentInstance               MovieManagerComponent;
  54. typedef void *                          ObjectRef;
  55. typedef void *                          ObjectSpec;
  56. typedef OSType                          MessageClass;
  57. typedef UInt32                          PropertyID;
  58. typedef UInt32                          MessageID;
  59. typedef OSType                          ValueFormat;
  60. typedef void *                          MessageData;
  61. /* == message class constants ==*/
  62. enum {
  63.     kMMgrGetPropertyClass       = FOUR_CHAR_CODE('getp'),
  64.     kMMgrSetPropertyClass       = FOUR_CHAR_CODE('setp'),
  65.     kMMgrSendCommandClass       = FOUR_CHAR_CODE('cmd ')
  66. };
  67. struct CharBuff {
  68.     UInt32                          length;
  69.     char *                          buff;
  70. };
  71. typedef struct CharBuff                 CharBuff;
  72. struct PropArg {
  73.     ValueFormat                     valueFormat;
  74.     void *                          value;                      /* data if <= 32 bits, otherwise pointer to the actual data */
  75. };
  76. typedef struct PropArg                  PropArg;
  77. struct PropertyParams {
  78.     UInt16                          paramCount;
  79.     UInt16                          flags;
  80.     PropArg                         args[8];
  81. };
  82. typedef struct PropertyParams           PropertyParams;
  83. /*
  84.    
  85.    struct with the same layout as a PropArg but with a union for the value field for ease of use 
  86. */
  87. struct PropArgU {
  88.     ValueFormat                     valueFormat;
  89.     union {
  90.         Boolean                         booleanVal;
  91.         SInt8                           byteVal;
  92.         SInt32                          longVal;
  93.         SInt16                          shortVal;
  94.         Fixed                           fixedVal;
  95.         Point                           pointVal;
  96.         QTFloatSingle                   float32Val;
  97.         QTFloatDouble *                 float64PtrVal;
  98.         void *                          voidVal;
  99.         StringPtr                       str255Val;
  100.         char *                          cStrVal;
  101.         CharBuff *                      charBuffVal;
  102.         RGBColor *                      rbgPtr;
  103.         Ptr                             ptrVal;
  104.         Handle                          textHandle;
  105.     }                                 value;
  106. };
  107. typedef struct PropArgU                 PropArgU;
  108. /*
  109.    
  110.    struct with the same layout as a PropertyParams but with an array of PropArgUs
  111. */
  112. struct PropertyParamsU {
  113.     UInt16                          paramCount;
  114.     UInt16                          flags;
  115.     PropArgU                        args[8];
  116. };
  117. typedef struct PropertyParamsU          PropertyParamsU;
  118. struct FindOffset {
  119.     TimeValue                       time;                       /* the movie time at which the text was found */
  120.     SInt32                          trackNum;                   /* number of the track in which the text was found */
  121.     SInt32                          offset;                     /* offset (in chars) of the text with the track's sample */
  122. };
  123. typedef struct FindOffset               FindOffset;
  124. /* == enums ==*/
  125. /* Movie Commands */
  126. enum {
  127.     kMMgrCmdAdd                 = FOUR_CHAR_CODE('add '),
  128.     kMMgrCmdAddScaled           = FOUR_CHAR_CODE('adsc'),
  129.     kMMgrCmdClear               = FOUR_CHAR_CODE('cler'),
  130.     kMMgrCmdCopy                = FOUR_CHAR_CODE('copy'),
  131.     kMMgrCmdCopyFrame           = FOUR_CHAR_CODE('cfrm'),
  132.     kMMgrCmdCut                 = FOUR_CHAR_CODE('cut '),
  133.     kMMgrCmdDelete              = FOUR_CHAR_CODE('delt'),
  134.     kMMgrCmdExportMovie         = FOUR_CHAR_CODE('expt'),
  135.     kMMgrCmdFindText            = FOUR_CHAR_CODE('find'),
  136.     kMMgrCmdFrameLoaded         = FOUR_CHAR_CODE('fram'),
  137.     kMMgrCmdGoBackAction        = FOUR_CHAR_CODE('gobk'),
  138.     kMMgrCmdIdle                = FOUR_CHAR_CODE('idle'),
  139.     kMMgrCmdLoadExporterSettings = FOUR_CHAR_CODE('lexp'),
  140.     kMMgrCmdMouseDown           = FOUR_CHAR_CODE('clik'),
  141.     kMMgrCmdMouseEnter          = FOUR_CHAR_CODE('entr'),
  142.     kMMgrCmdMouseExit           = FOUR_CHAR_CODE('exit'),
  143.     kMMgrCmdMouseTrigger        = FOUR_CHAR_CODE('trig'),
  144.     kMMgrCmdMouseUp             = FOUR_CHAR_CODE('cend'),
  145.     kMMgrCmdMovieLoaded         = FOUR_CHAR_CODE('load'),
  146.     kMMgrCmdNudge               = FOUR_CHAR_CODE('nudg'),
  147.     kMMgrCmdPaste               = FOUR_CHAR_CODE('pste'),
  148.     kMMgrCmdPause               = FOUR_CHAR_CODE('paus'),
  149.     kMMgrCmdPlay                = FOUR_CHAR_CODE('play'),
  150.     kMMgrCmdPreroll             = FOUR_CHAR_CODE('prol'),
  151.     kMMgrCmdReplace             = FOUR_CHAR_CODE('rplc'),
  152.     kMMgrCmdReverse             = FOUR_CHAR_CODE('rvrs'),
  153.     kMMgrCmdRewind              = FOUR_CHAR_CODE('rwnd'),
  154.     kMMgrCmdRotate              = FOUR_CHAR_CODE('rota'),
  155.     kMMgrCmdSave                = FOUR_CHAR_CODE('sve '),
  156.     kMMgrCmdSaveAs              = FOUR_CHAR_CODE('sas '),
  157.     kMMgrCmdSaveAsSelfContained = FOUR_CHAR_CODE('sass'),
  158.     kMMgrCmdSaveCopy            = FOUR_CHAR_CODE('scp '),
  159.     kMMgrCmdSaveCopySelfContained = FOUR_CHAR_CODE('scps'),
  160.     kMMgrCmdSaveExporterSettings = FOUR_CHAR_CODE('sexp'),
  161.     kMMgrCmdSaveSelfContained   = FOUR_CHAR_CODE('sves'),
  162.     kMMgrCmdShowDefaultView     = FOUR_CHAR_CODE('sdfl'),
  163.     kMMgrCmdShowExportDialog    = FOUR_CHAR_CODE('shoe'),
  164.     kMMgrCmdShowPoster          = FOUR_CHAR_CODE('spos'),
  165.     kMMgrCmdSkew                = FOUR_CHAR_CODE('skew'),
  166.     kMMgrCmdStep                = FOUR_CHAR_CODE('step'),
  167.     kMMgrCmdStepFwd             = FOUR_CHAR_CODE('stpf'),
  168.     kMMgrCmdStepRev             = FOUR_CHAR_CODE('stpr'),
  169.     kMMgrCmdStop                = FOUR_CHAR_CODE('stop'),
  170.     kMMgrCmdTrim                = FOUR_CHAR_CODE('trim'),
  171.     kMMgrCmdUndo                = FOUR_CHAR_CODE('undo')
  172. };
  173. /* Properties */
  174. enum {
  175.     kMMgrPropActionsEnabled     = FOUR_CHAR_CODE('a ok'),
  176.     kMMgrPropActiveTransport    = FOUR_CHAR_CODE('atrn'),
  177.     kMMgrPropAlbum              = FOUR_CHAR_CODE('゛lb'),
  178.     kMMgrPropAllowBalloonHelp   = FOUR_CHAR_CODE('balo'),
  179.     kMMgrPropAllowEditing       = FOUR_CHAR_CODE('edit'),
  180.     kMMgrPropAllowMultipleStreams = FOUR_CHAR_CODE('amss'),
  181.     kMMgrPropArtist             = FOUR_CHAR_CODE('@ART'),
  182.     kMMgrPropAttached           = FOUR_CHAR_CODE('atch'),
  183.     kMMgrPropAutoPlay           = FOUR_CHAR_CODE('play'),
  184.     kMMgrPropBackColor          = FOUR_CHAR_CODE('bclr'),
  185.     kMMgrPropBadge              = FOUR_CHAR_CODE('badg'),
  186.     kMMgrPropBitRate            = FOUR_CHAR_CODE('brte'),
  187.     kMMgrPropBottom             = FOUR_CHAR_CODE('botm'),
  188.     kMMgrPropBottomRight        = FOUR_CHAR_CODE('btrt'),
  189.     kMMgrPropChapterTrackRef    = FOUR_CHAR_CODE('chap'),
  190.     kMMgrPropChapterMode        = FOUR_CHAR_CODE('chmd'),
  191.     kMMgrPropChapterName        = FOUR_CHAR_CODE('@chp'),
  192.     kMMgrPropCharacteristics    = FOUR_CHAR_CODE('char'),
  193.     kMMgrPropCodecSequence      = FOUR_CHAR_CODE('cseq'),
  194.     kMMgrPropCommands           = FOUR_CHAR_CODE('cmds'),
  195.     kMMgrPropComments           = FOUR_CHAR_CODE('cmnt'),
  196.     kMMgrPropComponentVersion   = FOUR_CHAR_CODE('cvrs'),
  197.     kMMgrPropCompressMovieHeader = FOUR_CHAR_CODE('chdr'),
  198.     kMMgrPropConnectionSpeed    = FOUR_CHAR_CODE('cspd'),
  199.     kMMgrPropConverted          = FOUR_CHAR_CODE('cnvt'),
  200.     kMMgrPropCopyright          = FOUR_CHAR_CODE('ヽpy'),
  201.     kMMgrPropCursorID           = FOUR_CHAR_CODE('crid'),
  202.     kMMgrPropCurrNodeID         = FOUR_CHAR_CODE('cnod'),
  203.     kMMgrPropDataRefs           = FOUR_CHAR_CODE('dtrf'),
  204.     kMMgrPropDefaultNodeID      = FOUR_CHAR_CODE('dnod'),
  205.     kMMgrPropDescription        = FOUR_CHAR_CODE('ヾes'),
  206.     kMMgrPropDefaultRect        = FOUR_CHAR_CODE('drct'),
  207.     kMMgrPropDragEnabled        = FOUR_CHAR_CODE('drag'),
  208.     kMMgrPropDuration           = FOUR_CHAR_CODE('dura'),
  209.     kMMgrPropEnabled            = FOUR_CHAR_CODE('enab'),
  210.     kMMgrPropEndSelection       = FOUR_CHAR_CODE('ends'),
  211.     kMMgrPropEndTime            = FOUR_CHAR_CODE('endt'),
  212.     kMMgrPropExporter           = FOUR_CHAR_CODE('exp '),
  213.     kMMgrPropExporters          = FOUR_CHAR_CODE('exps'),
  214.     kMMgrPropFieldOfView        = FOUR_CHAR_CODE('fov '),
  215.     kMMgrPropFieldOfViewRange   = FOUR_CHAR_CODE('fovr'),
  216.     kMMgrPropFindTextCaseSensitive = FOUR_CHAR_CODE('fcse'),
  217.     kMMgrPropFindTextReverse    = FOUR_CHAR_CODE('frev'),
  218.     kMMgrPropFindTextStart      = FOUR_CHAR_CODE('fstt'),
  219.     kMMgrPropFindTextWrapAround = FOUR_CHAR_CODE('fwrp'),
  220.     kMMgrPropFlattenCrossplatform = FOUR_CHAR_CODE('flat'),
  221.     kMMgrPropForeColor          = FOUR_CHAR_CODE('fclr'),
  222.     kMMgrPropFormat             = FOUR_CHAR_CODE('frmt'),
  223.     kMMgrPropFoundTextOffset    = FOUR_CHAR_CODE('foff'),
  224.     kMMgrPropFrameObjects       = FOUR_CHAR_CODE('frob'),
  225.     kMMgrPropFrameRate          = FOUR_CHAR_CODE('frte'),
  226.     kMMgrPropFullCommandList    = FOUR_CHAR_CODE('fcmd'),
  227.     kMMgrPropFullName           = FOUR_CHAR_CODE('﹏am'),
  228.     kMMgrPropFullPropertyList   = FOUR_CHAR_CODE('fprp'),
  229.     kMMgrPropGraphicsMode       = FOUR_CHAR_CODE('mode'),
  230.     kMMgrPropHasChanged         = FOUR_CHAR_CODE('drty'),
  231.     kMMgrPropHeight             = FOUR_CHAR_CODE('hght'),
  232.     kMMgrPropHighQualityMode    = FOUR_CHAR_CODE('hqty'),
  233.     kMMgrPropHREF               = FOUR_CHAR_CODE('href'),
  234.     kMMgrPropHTTPProxy          = FOUR_CHAR_CODE('http'),
  235.     kMMgrPropHTTPTransport      = FOUR_CHAR_CODE('httt'),
  236.     kMMgrPropID                 = FOUR_CHAR_CODE('id  '),
  237.     kMMgrPropIdleFrequency      = FOUR_CHAR_CODE('idle'),
  238.     kMMgrPropImageCorrection    = FOUR_CHAR_CODE('icor'),
  239.     kMMgrPropImageName          = FOUR_CHAR_CODE('imnm'),
  240.     kMMgrPropImageNdx           = FOUR_CHAR_CODE('imnd'),
  241.     kMMgrPropImageQuality       = FOUR_CHAR_CODE('iqty'),
  242.     kMMgrPropInformation        = FOUR_CHAR_CODE('﹊nf'),
  243.     kMMgrPropIsRegistered       = FOUR_CHAR_CODE('regi'),
  244.     kMMgrPropIsVRMovie          = FOUR_CHAR_CODE('isvr'),
  245.     kMMgrPropLanguage           = FOUR_CHAR_CODE('lang'),
  246.     kMMgrPropLayer              = FOUR_CHAR_CODE('layr'),
  247.     kMMgrPropLeft               = FOUR_CHAR_CODE('left'),
  248.     kMMgrPropLinkDestination    = FOUR_CHAR_CODE('dest'),
  249.     kMMgrPropLoadState          = FOUR_CHAR_CODE('load'),
  250.     kMMgrPropLocation           = FOUR_CHAR_CODE('loc '),
  251.     kMMgrPropLockMessages       = FOUR_CHAR_CODE('lokm'),
  252.     kMMgrPropLockScreen         = FOUR_CHAR_CODE('loks'),
  253.     kMMgrPropLoop               = FOUR_CHAR_CODE('loop'),
  254.     kMMgrPropLoopIsPalindrome   = FOUR_CHAR_CODE('paln'),
  255.     kMMgrPropMask               = FOUR_CHAR_CODE('mask'),
  256.     kMMgrPropMatrix             = FOUR_CHAR_CODE('mtrx'),
  257.     kMMgrPropMaxTimeLoaded      = FOUR_CHAR_CODE('mtme'),
  258.     kMMgrPropMemCheckLevel      = FOUR_CHAR_CODE('dbmc'),
  259.     kMMgrPropMessages           = FOUR_CHAR_CODE('msg '),
  260.     kMMgrPropMIMEType           = FOUR_CHAR_CODE('mime'),
  261.     kMMgrPropMissingComponents  = FOUR_CHAR_CODE('miss'),
  262.     kMMgrPropMovie              = FOUR_CHAR_CODE('moov'),
  263.     kMMgrPropMute               = FOUR_CHAR_CODE('mute'),
  264.     kMMgrPropName               = FOUR_CHAR_CODE('name'),
  265.     kMMgrPropNextMovie          = FOUR_CHAR_CODE('next'),
  266.     kMMgrPropNoProxyHosts       = FOUR_CHAR_CODE('nprx'),
  267.     kMMgrPropNumber             = FOUR_CHAR_CODE('numb'),
  268.     kMMgrPropOriginalFormat     = FOUR_CHAR_CODE('ゝmt'),
  269.     kMMgrPropOriginalSource     = FOUR_CHAR_CODE('﹕rc'),
  270.     kMMgrPropOwner              = FOUR_CHAR_CODE('ownr'),
  271.     kMMgrPropPacketLoss         = FOUR_CHAR_CODE('loss'),
  272.     kMMgrPropPanAngle           = FOUR_CHAR_CODE('pan '),
  273.     kMMgrPropPanAngleRange      = FOUR_CHAR_CODE('panr'),
  274.     kMMgrPropPlaySelectionOnly  = FOUR_CHAR_CODE('psel'),
  275.     kMMgrPropPort               = FOUR_CHAR_CODE('port'),
  276.     kMMgrPropPreferredLoc       = FOUR_CHAR_CODE('ploc'),
  277.     kMMgrPropPreferredRate      = FOUR_CHAR_CODE('prte'),
  278.     kMMgrPropPreferredSoundVolume = FOUR_CHAR_CODE('pvol'),
  279.     kMMgrPropProperties         = FOUR_CHAR_CODE('prop'),
  280.     kMMgrPropRate               = FOUR_CHAR_CODE('rate'),
  281.     kMMgrPropReadOnly           = FOUR_CHAR_CODE('rwno'),
  282.     kMMgrPropRectangle          = FOUR_CHAR_CODE('rect'),
  283.     kMMgrPropRight              = FOUR_CHAR_CODE('rght'),
  284.     kMMgrPropRTSPProxy          = FOUR_CHAR_CODE('rtsp'),
  285.     kMMgrPropSaveDisabled       = FOUR_CHAR_CODE('save'),
  286.     kMMgrPropScale              = FOUR_CHAR_CODE('scal'),
  287.     kMMgrPropScaleMedia         = FOUR_CHAR_CODE('spsc'),
  288.     kMMgrPropScript             = FOUR_CHAR_CODE('scrp'),
  289.     kMMgrPropSeeAllFrames       = FOUR_CHAR_CODE('sall'),
  290.     kMMgrPropShowHotSpots       = FOUR_CHAR_CODE('show'),
  291.     kMMgrPropShowStreamStatsNames = FOUR_CHAR_CODE('snam'),
  292.     kMMgrPropSize               = FOUR_CHAR_CODE('size'),
  293.     kMMgrPropSOCKSProxy         = FOUR_CHAR_CODE('sock'),
  294.     kMMgrPropSoftware           = FOUR_CHAR_CODE('﹕wr'),
  295.     kMMgrPropSoundBalance       = FOUR_CHAR_CODE('sbal'),
  296.     kMMgrPropSoundBass          = FOUR_CHAR_CODE('sbas'),
  297.     kMMgrPropSoundOutputComponent = FOUR_CHAR_CODE('sout'),
  298.     kMMgrPropSoundTreble        = FOUR_CHAR_CODE('strb'),
  299.     kMMgrPropSoundVolume        = FOUR_CHAR_CODE('svol'),
  300.     kMMgrPropStartSelection     = FOUR_CHAR_CODE('strs'),
  301.     kMMgrPropStartTime          = FOUR_CHAR_CODE('strt'),
  302.     kMMgrPropStatus             = FOUR_CHAR_CODE('stts'),
  303.     kMMgrPropStreamStats        = FOUR_CHAR_CODE('stat'),
  304.     kMMgrPropSuppressHotSpotNames = FOUR_CHAR_CODE('hnam'),
  305.     kMMgrPropTargetMovieID      = FOUR_CHAR_CODE('tid '),
  306.     kMMgrPropTargetMovieName    = FOUR_CHAR_CODE('tnam'),
  307.     kMMgrPropText               = FOUR_CHAR_CODE('text'),
  308.     kMMgrPropTiltAngle          = FOUR_CHAR_CODE('tlt '),
  309.     kMMgrPropTiltAngleRange     = FOUR_CHAR_CODE('tltr'),
  310.     kMMgrPropTime               = FOUR_CHAR_CODE('time'),
  311.     kMMgrPropTimeScale          = FOUR_CHAR_CODE('tscl'),
  312.     kMMgrPropTop                = FOUR_CHAR_CODE('top '),
  313.     kMMgrPropTopLeft            = FOUR_CHAR_CODE('topl'),
  314.     kMMgrPropType               = FOUR_CHAR_CODE('type'),
  315.     kMMgrPropUDPTransport       = FOUR_CHAR_CODE('udpt'),
  316.     kMMgrPropURL                = FOUR_CHAR_CODE('url '),
  317.     kMMgrPropUseCustomCLUT      = FOUR_CHAR_CODE('clut'),
  318.     kMMgrPropUserData           = FOUR_CHAR_CODE('udat'),
  319.     kMMgrPropVariable           = FOUR_CHAR_CODE('var '),
  320.     kMMgrPropVersion            = FOUR_CHAR_CODE('vers'),
  321.     kMMgrPropVisible            = FOUR_CHAR_CODE('visi'),
  322.     kMMgrPropWidth              = FOUR_CHAR_CODE('widt')
  323. };
  324. /*
  325.    **
  326.    == object specification ==
  327. */
  328. enum {
  329.                                                                 /* ***/
  330.                                                                 /* obj->objClass*/
  331.     kObjClassQuickTime          = FOUR_CHAR_CODE('cQtm'),
  332.     kObjClassMovie              = FOUR_CHAR_CODE('cMoV'),
  333.     kObjClassWindow             = FOUR_CHAR_CODE('cwnd'),
  334.     kObjClassTrack              = FOUR_CHAR_CODE('ctrk'),
  335.     kObjClassSprite             = FOUR_CHAR_CODE('cspr'),
  336.     kObjClassHotSpot            = FOUR_CHAR_CODE('chsp'),
  337.     kObjClassNode               = FOUR_CHAR_CODE('cnde'),
  338.     kObjClassQTiObj             = FOUR_CHAR_CODE('cqti'),
  339.     kObjClassController         = FOUR_CHAR_CODE('cctr'),
  340.     kObjClassImage              = FOUR_CHAR_CODE('cimg'),
  341.     kObjClassScene              = FOUR_CHAR_CODE('cscn'),
  342.     kObjClassDataRefs           = FOUR_CHAR_CODE('data'),
  343.     kObjUserData                = FOUR_CHAR_CODE('udta'),
  344.     kObjClassEvery              = FOUR_CHAR_CODE('****'),       /* ** */
  345.                                                                 /* obj->objRefType*/
  346.     kByIndex                    = FOUR_CHAR_CODE('indx'),       /* formAbsolutePosition */
  347.     kByID                       = FOUR_CHAR_CODE('ID  '),       /* formUniqueID */
  348.     kByName                     = FOUR_CHAR_CODE('name'),       /* formName */
  349.     kByPosition                 = FOUR_CHAR_CODE('rele'),       /* formRelativePosition */
  350.     kByType                     = FOUR_CHAR_CODE('type'),       /* ** */
  351.                                                                 /* special values when obj->objRefVal == kByIndex */
  352.     kIndexFirst                 = 1,
  353.     kIndexAll                   = -1,
  354.     kIndexLast                  = -2,
  355.     kIndexMiddle                = -3,
  356.     kIndexAny                   = -4,                           /* ** */
  357.                                                                 /* values when obj->objRefVal == kByPosition */
  358.     kIndexThis                  = FOUR_CHAR_CODE('this'),
  359.     kIndexPrev                  = FOUR_CHAR_CODE('prev'),       /* kAEPrevious */
  360.     kIndexNext                  = FOUR_CHAR_CODE('next'),       /* kAENext */
  361.                                                                 /* ** */
  362.                                                                 /* obj->objModifier "special" track types (non-media types) */
  363.     kTrackTypeAny               = FOUR_CHAR_CODE('*trk'),
  364.     kTrackTypeQTVR              = FOUR_CHAR_CODE('vrtr'),
  365.     KTrackTypeMPEGVideo         = FOUR_CHAR_CODE('m1a '),
  366.     KTrackTypeMPEGAudeo         = FOUR_CHAR_CODE('m1v '),
  367.     kTrackTypeChapter           = FOUR_CHAR_CODE('chap'),       /* kTrackReferenceChapterList */
  368.     kTrackTypeAudio             = FOUR_CHAR_CODE('ears'),       /* AudioMediaCharacteristic */
  369.     kTrackTypeVisual            = FOUR_CHAR_CODE('eyes'),       /* VisualMediaCharacteristic */
  370.     kTrackTypeStreaming         = FOUR_CHAR_CODE('strm')        /* kQTSStreamMediaType*/
  371. };
  372. /* == movie manager object spec structures ==*/
  373. /*
  374.    **
  375.    == movie object spec ==
  376. */
  377. struct ExternalObjectSpec {
  378.     OSType                          objClass;                   /* type of object (movie, track, etc) */
  379.     OSType                          objModifier;                /* object modifier (track type, etc) */
  380.     OSType                          objRefType;                 /* how to interpret objRefVal (by name, by ID, etc) */
  381.     SInt32                          objRefVal;                  /* object identifier (ID, index, offset to name, etc) */
  382. };
  383. typedef struct ExternalObjectSpec       ExternalObjectSpec;
  384. typedef ExternalObjectSpec *            ExternalObjectSpecPtr;
  385. struct MovieObjectSpec {
  386.     SInt32                          count;
  387.     ExternalObjectSpec              objRef[1];
  388. };
  389. typedef struct MovieObjectSpec          MovieObjectSpec;
  390. typedef MovieObjectSpec *               MovieObjectSpecPtr;
  391. struct MovieObjectRecord {
  392.     SInt32                          data[1];
  393. };
  394. typedef struct MovieObjectRecord        MovieObjectRecord;
  395. typedef MovieObjectRecord *             MovieObjectPtr;
  396. /* == movie manager object reference structures ==*/
  397. /*
  398.    **
  399.    == forward struct declarations for recursively-defined structures
  400. */
  401. typedef struct MovieRef                 MovieRef;
  402. typedef MovieRef *                      MovieRefPtr;
  403. typedef struct TrackRef                 TrackRef;
  404. typedef TrackRef *                      TrackRefPtr;
  405. typedef struct SceneRef                 SceneRef;
  406. typedef SceneRef *                      SceneRefPtr;
  407. typedef struct SpriteRef                SpriteRef;
  408. typedef SpriteRef *                     SpriteRefPtr;
  409. typedef struct NodeRef                  NodeRef;
  410. typedef NodeRef *                       NodeRefPtr;
  411. typedef struct HotSpotRef               HotSpotRef;
  412. typedef HotSpotRef *                    HotSpotRefPtr;
  413. typedef struct GenericRef               GenericRef;
  414. typedef GenericRef *                    GenericRefPtr;
  415. /* header common to all movie object reference structures*/
  416. struct GenericRef {
  417.     GenericRefPtr                   parent;
  418.     GenericRefPtr                   child;
  419.     OSType                          objType;
  420. };
  421. struct MovieObjectRef {
  422.     void *                          reserved;
  423.     OSType                          targetType;
  424.     SInt32                          objectCount;
  425.     union {
  426.         GenericRefPtr                   generic;
  427.         MovieRefPtr                     movie;
  428.         TrackRefPtr                     track;
  429.         SceneRefPtr                     scene;
  430.         SpriteRefPtr                    sprite;
  431.         NodeRefPtr                      node;
  432.         HotSpotRefPtr                   hotSpot;
  433.     }                                 obj;
  434. };
  435. typedef struct MovieObjectRef           MovieObjectRef;
  436. typedef MovieObjectRef *                MovieObjectRefPtr;
  437. #define    MOVIE_OBJECT_REF_TYPE(ref)  ((ref) ? (ref)->obj.generic->objType : 0)
  438. struct MovieRef {
  439.     TrackRefPtr                     parent;                     /* track or NULL if is root movie*/
  440.     TrackRefPtr                     child;                      /* child track */
  441.     OSType                          objType;
  442.     Movie                           movie;
  443.     MovieController                 controller;
  444.     DoMCActionUPP                   mcActionFilterUPP;          /* UPP of MovieMedia movie controller's filter proc*/
  445.     void *                          mcActionRefcon;             /* refcon for same*/
  446. };
  447. struct TrackRef {
  448.     MovieRefPtr                     parent;                     /* parent movie */
  449.     GenericRefPtr                   child;                      /* child scene or node */
  450.     OSType                          objType;
  451.     UInt32                          flags;
  452.     OSType                          trackType;
  453.     Track                           track;
  454.     SInt32                          id;
  455.     SInt32                          index;
  456.     Media                           media;
  457.                                                                 /* VR only data*/
  458.     QTVRInstance                    vrInstance;
  459.     QTAtomContainer                 vrWorld;
  460. };
  461. struct SceneRef {
  462.     TrackRefPtr                     parent;                     /* parent track */
  463.     SpriteRefPtr                    child;                      /* child sprite */
  464.     OSType                          objType;
  465.     SInt32                          index;                      /* ID is the same as index*/
  466.     TimeValue                       startTime;
  467.     TimeValue                       duration;
  468.     SInt32                          currentSceneIndex;
  469. };
  470. struct SpriteRef {
  471.     SceneRefPtr                     parent;
  472.     GenericRefPtr                   child;                      /* NULL, sprites have no children */
  473.     OSType                          objType;
  474.     MediaHandler                    handler;
  475.     QTAtomID                        id;
  476.     SInt16                          index;
  477. };
  478. struct NodeRef {
  479.     TrackRefPtr                     parent;                     /* parent track */
  480.     HotSpotRefPtr                   child;                      /* NULL, */
  481.     OSType                          objType;
  482.     QTAtomContainer                 info;
  483.     QTAtomID                        id;
  484.     SInt16                          index;
  485.     UInt16                          flags;
  486. };
  487. struct HotSpotRef {
  488.     NodeRefPtr                      parent;                     /* parent node */
  489.     GenericRefPtr                   child;                      /* NULL, hotspots have no children */
  490.     OSType                          objType;
  491.     QTAtomID                        id;
  492.     SInt16                          index;
  493. };
  494. enum {
  495.     kReserved1                  = (1L << 0),
  496.     kReserved2                  = (1L << 1),
  497.     kHasAudioCharacteristics    = (1L << 2),
  498.     kHasVisualCharacteristics   = (1L << 3),
  499.     kHasTextCharacteristics     = (1L << 4),
  500.     kCanSendVideoCharacteristics = (1L << 5),
  501.     kProvidesActionsCharacteristics = (1L << 6),
  502.     kHasNonLinearCharacteristics = (1L << 7),
  503.     kHasCanStepCharacteristics  = (1L << 8),
  504.     kHasNoDurationCharacteristics = (1L << 9),                  /* not really "characteristics", but hey...*/
  505.     kHasSpriteCharacteristics   = (1L << 10),
  506.     kHasVRCharacteristics       = (1L << 11),
  507.     kHasStreamingCharacteristics = (1L << 12),
  508.     kHasMovieCharacteristics    = (1L << 13)
  509. };
  510. /* == data types ==*/
  511. enum {
  512.     kPtrToDataType              = (1L << 31),
  513.     dataType_Boolean            = FOUR_CHAR_CODE('bool'),
  514.     dataType_BooleanPtr         = (dataType_Boolean | kPtrToDataType),
  515.     dataType_UInt8              = FOUR_CHAR_CODE('ui8 '),
  516.     dataType_UInt8Ptr           = (dataType_Boolean | kPtrToDataType),
  517.     dataType_Int8               = FOUR_CHAR_CODE('i8  '),
  518.     dataType_Int8Ptr            = (dataType_Int8 | kPtrToDataType),
  519.     dataType_UInt16             = FOUR_CHAR_CODE('ui16'),
  520.     dataType_UInt16Ptr          = (dataType_UInt16 | kPtrToDataType),
  521.     dataType_Int16              = FOUR_CHAR_CODE('i16 '),
  522.     dataType_Int16Ptr           = (dataType_Int16 | kPtrToDataType),
  523.     dataType_UInt32             = FOUR_CHAR_CODE('ui32'),
  524.     dataType_UInt32Ptr          = (dataType_UInt32 | kPtrToDataType),
  525.     dataType_Int32              = FOUR_CHAR_CODE('i32 '),
  526.     dataType_Int32Ptr           = (dataType_Int32 | kPtrToDataType),
  527.     dataType_FourCharCode       = FOUR_CHAR_CODE('code'),
  528.     dataType_FourCharCodePtr    = (dataType_FourCharCode | kPtrToDataType),
  529.     dataType_RGBColor           = FOUR_CHAR_CODE('rgba'),
  530.     dataType_RGBColorPtr        = (dataType_RGBColor | kPtrToDataType),
  531.     dataType_Fixed              = FOUR_CHAR_CODE('fix '),
  532.     dataType_FixedPtr           = (dataType_Fixed | kPtrToDataType),
  533.     dataType_FloatSingle        = FOUR_CHAR_CODE('fsin'),
  534.     dataType_FloatSinglePtr     = (dataType_FloatSingle | kPtrToDataType),
  535.     dataType_FloatDouble        = FOUR_CHAR_CODE('fdbl'),
  536.     dataType_FloatDoublePtr     = (dataType_FloatDouble | kPtrToDataType),
  537.     dataType_QDPoint            = FOUR_CHAR_CODE('poin'),
  538.     dataType_QDPointPtr         = (dataType_QDPoint | kPtrToDataType),
  539.     dataType_FixedPoint         = FOUR_CHAR_CODE('fixp'),
  540.     dataType_FixedPointPtr      = (dataType_FixedPoint | kPtrToDataType),
  541.     dataType_QDRect             = FOUR_CHAR_CODE('rect'),
  542.     dataType_QDRectPtr          = (dataType_QDRect | kPtrToDataType),
  543.     dataType_QDRegion           = FOUR_CHAR_CODE('rgn '),
  544.     dataType_QDRegionPtr        = (dataType_QDRegion | kPtrToDataType),
  545.     dataType_PString            = FOUR_CHAR_CODE('pstr'),
  546.     dataType_PStringPtr         = (dataType_PString | kPtrToDataType),
  547.     dataType_CString            = FOUR_CHAR_CODE('cstr'),
  548.     dataType_CStringPtr         = (dataType_CString | kPtrToDataType),
  549.     dataType_CharBuff           = FOUR_CHAR_CODE('cbuf'),
  550.     dataType_CharBuffPtr        = (dataType_CharBuff | kPtrToDataType),
  551.     dataType_TextHandle         = FOUR_CHAR_CODE('text'),
  552.     dataType_TextHandlePtr      = (dataType_TextHandle | kPtrToDataType),
  553.     dataType_Matrix             = FOUR_CHAR_CODE('matr'),
  554.     dataType_MatrixPtr          = (dataType_Matrix | kPtrToDataType),
  555.     dataType_Alias              = FOUR_CHAR_CODE('alis'),
  556.     dataType_AliasPtr           = (dataType_Alias | kPtrToDataType),
  557.     dataType_MacDate            = FOUR_CHAR_CODE('date'),
  558.     dataType_MacDatePtr         = (dataType_MacDate | kPtrToDataType),
  559.     dataType_TimeValue          = FOUR_CHAR_CODE('time'),
  560.     dataType_TimeValuePtr       = (dataType_TimeValue | kPtrToDataType),
  561.     dataType_BCDVersion         = FOUR_CHAR_CODE('vers'),
  562.     dataType_BCDVersionPtr      = (dataType_BCDVersion | kPtrToDataType),
  563.     dataType_Opaque             = FOUR_CHAR_CODE('void'),
  564.     dataType_OpaquePtr          = (dataType_Opaque | kPtrToDataType),
  565.     dataType_GraphicsMode       = FOUR_CHAR_CODE('gmod'),
  566.     dataType_GraphicsModePtr    = (dataType_GraphicsMode | kPtrToDataType),
  567.     dataType_GraphicsModeRecord = FOUR_CHAR_CODE('gmrc'),
  568.     dataType_GraphicsModeRecordPtr = (dataType_GraphicsModeRecord | kPtrToDataType),
  569.     dataType_QTSProxyPref       = FOUR_CHAR_CODE('prxy'),
  570.     dataType_QTSProxyPrefPtr    = (dataType_QTSProxyPref | kPtrToDataType),
  571.     dataType_QTSTransportPref   = FOUR_CHAR_CODE('trns'),
  572.     dataType_QTSTransportPrefPtr = (dataType_QTSTransportPref | kPtrToDataType),
  573.     dataType_QTSNoProxyPref     = FOUR_CHAR_CODE('nprx'),
  574.     dataType_QTSNoProxyPrefPtr  = (dataType_QTSNoProxyPref | kPtrToDataType),
  575.     dataType_FindOffset         = FOUR_CHAR_CODE('find'),
  576.     dataType_FindOffsetPtr      = (dataType_FindOffset | kPtrToDataType)
  577. };
  578. /* == movie manager notification flags == */
  579. enum {
  580.     kNotifyBeforeMessageSend    = (1L << 0),                    /* notify before a message is sent to an object*/
  581.     kNotifyAfterMessageSend     = (1L << 1),                    /* notify after a message was successfully sent to an object*/
  582.     kNotifyOnHighLevelEvent     = (1L << 2),                    /* notify before high level events*/
  583.     kNotifyOnMouseEvent         = (1L << 3),                    /* notify before mouse up/down/enter/exit/trigger events*/
  584.     kNotifyOnMCActionEvent      = (1L << 4)                     /* notify before looking at mcAction events*/
  585. };
  586. /* == movie manager notification types ==*/
  587. enum {
  588.                                                                 /* ***/
  589.                                                                 /* notification types*/
  590.     kNotifyTypeHighLevelEvent   = FOUR_CHAR_CODE('high'),       /* hight level event (HighLevelEventRecord *)*/
  591.     kNotifyTypeMCAction         = FOUR_CHAR_CODE('mcac'),       /* mcAction notification (MMgrControllerEventRecord *)*/
  592.     kNotifyMouseEvent           = FOUR_CHAR_CODE('mous'),       /* mouse event*/
  593.     kNotifyTypePreMessageSend   = FOUR_CHAR_CODE('prms'),       /* message send (MovieObjectRef *)*/
  594.     kNotifyTypePostMessageSend  = FOUR_CHAR_CODE('poms')        /* */
  595. };
  596. /* == movie manager notification IDs ==*/
  597. enum {
  598.                                                                 /* ***/
  599.                                                                 /* "high level" events*/
  600.     kNotifyOpenMovie            = FOUR_CHAR_CODE('open'),
  601.     kNotifyCloseMovie           = FOUR_CHAR_CODE('clos'),
  602.     kNotifyEnteringNode         = FOUR_CHAR_CODE('vren'),       /* entering node, data = new node ID (SInt32)*/
  603.     kNotifyLeavingNode          = FOUR_CHAR_CODE('vrlv'),       /* leaving VR node, data = leave node data (LeaveNodeRecord *)*/
  604.                                                                 /* ?? */
  605.                                                                 /* ????? does it make sense to send these notifications? User could use the notification to set the*/
  606.                                                                 /* ?????  movieID/movieName property, which would then be returned...*/
  607.                                                                 /*@@@@@   kGetExternalMovieID,*/
  608.                                                                 /*@@@@@   kGetExternalMovieName,*/
  609.                                                                 /* ?????*/
  610.     kNotifyEdited               = FOUR_CHAR_CODE('edit'),       /* movie has been edited*/
  611.     kNotifyLinkToURL            = FOUR_CHAR_CODE('lurl'),       /* the movie wants to link to a url, data = URL (handle of C string)*/
  612.     kNotifyRateChanged          = FOUR_CHAR_CODE('rate'),       /* the movie's rate has changed, data = rate (Fixed)*/
  613.     kNotifyTimeChanged          = FOUR_CHAR_CODE('ctim'),       /* the movie's time has changed, data = new time (SInt32)*/
  614.     kNotifyVolumeChanged        = FOUR_CHAR_CODE('cvol'),       /* the movie's volume has changed, data = new volume (SInt32)*/
  615.     kNotifyShowStatusString     = FOUR_CHAR_CODE('stts'),       /* a movie status message, data = status string (handle of C string)*/
  616.     kNotifyShowMessageString    = FOUR_CHAR_CODE('smsg'),       /* a sprite message string (mcActionShowMessageString), data = string (StringPtr)*/
  617.     kNotifySpriteCustomAction   = FOUR_CHAR_CODE('scst'),       /* a sprite custom app wired event (kActionApplicationNumberAndString), data = params (SpriteDebugMessage *)*/
  618.     kNotifySpriteDebugStr       = FOUR_CHAR_CODE('sdbg'),       /* a sprite debugstr wired event (kActionDebugStr), param = string (stringPtr)*/
  619.                                                                 /* ***/
  620.                                                                 /* mouse event notification*/
  621.     kNotifyMouseEnter           = FOUR_CHAR_CODE('entr'),       /* mouse has entered a movie object, data = object ID (SInt32)*/
  622.     kNotifyMouseWithin          = FOUR_CHAR_CODE('mwin'),       /* mouse is still within a movie object, data = object ID (SInt32)*/
  623.     kNotifyMouseExit            = FOUR_CHAR_CODE('exit'),       /* mouse has left the building, data = object ID (SInt32)*/
  624.     kNotifyMouseDown            = FOUR_CHAR_CODE('clik'),       /* mouse clicked within a movie object, data = object ID (SInt32)*/
  625.     kNotifyMouseStillDown       = FOUR_CHAR_CODE('stld'),       /* mouse is still down within a movie object, data = object ID (SInt32)*/
  626.     kNotifyMouseTrigger         = FOUR_CHAR_CODE('trig'),       /* mouse released within the movie object it went down in, data = object ID (SInt32)*/
  627.     kNotifyMouseUp              = FOUR_CHAR_CODE('cend')        /* mouse released outside of the movie object it went down in, data = object ID (SInt32)*/
  628. };
  629. /*
  630.    **
  631.    == movie manager event record == 
  632. */
  633. struct MMgrEventRecord {
  634.     OSType                          objClass;                   /* class of event target object*/
  635.     SInt32                          when;                       /* ticks at time of event*/
  636.     Point                           where;                      /* local mouse loc at time of event*/
  637.     UInt32                          flags;
  638. };
  639. typedef struct MMgrEventRecord          MMgrEventRecord;
  640. typedef MMgrEventRecord *               MMgrEventRecordPtr;
  641. /*
  642.    **
  643.    == structure passed to notification proc for a controller filter event notification ==
  644. */
  645. struct MMgrControllerEventRecord {
  646.     void *                          params;                     /* param normally passed to controller filter for this action*/
  647.     SInt16                          action;                     /* action*/
  648. };
  649. typedef struct MMgrControllerEventRecord MMgrControllerEventRecord;
  650. typedef MMgrControllerEventRecord *     MMgrControllerEventRecordPtr;
  651. /*
  652.    **
  653.    == structure passed to notification proc for pre/post message send ==
  654. */
  655. struct MMgrMessageNotificationRecord {
  656.     MovieObjectRef *                targetObject;               /* resolved movie object target*/
  657.     MessageClass                    msgClass;                   /* message class*/
  658.     MessageID                       msgID;                      /* message ID*/
  659.     PropertyParams *                params;                     /* message params*/
  660. };
  661. typedef struct MMgrMessageNotificationRecord MMgrMessageNotificationRecord;
  662. typedef MMgrMessageNotificationRecord * MMgrMessageNotificationRecordPtr;
  663. /*
  664.    **
  665.    == movie manager hight level event notification record == 
  666. */
  667. struct HighLevelEventRecord {
  668.     OSType                          eventID;
  669.     void *                          data;                       /* event specific params*/
  670. };
  671. typedef struct HighLevelEventRecord     HighLevelEventRecord;
  672. /*
  673.    **
  674.    == structure passed to notification proc for a sprite kNotifySpriteCustomAction (kActionApplicationNumberAndString) notification ==
  675. */
  676. struct SpriteDebugMessage {
  677.     SInt32                          number;                     /* sprite action param 1, a long*/
  678.     Handle                          stringHandle;               /* sprite action param 2, a Pascal string*/
  679. };
  680. typedef struct SpriteDebugMessage       SpriteDebugMessage;
  681. typedef SpriteDebugMessage *            SpriteDebugMessagePtr;
  682. /*
  683.    **
  684.    == structure passed to notification proc upon leaving a VR node ==
  685. */
  686. struct LeaveNodeRecord {
  687.     UInt32                          fromNodeID;                 /* the id of the node we're about to leave*/
  688.     UInt32                          toNodeID;                   /* the id of the node we're about to enter*/
  689. };
  690. typedef struct LeaveNodeRecord          LeaveNodeRecord;
  691. typedef LeaveNodeRecord *               LeaveNodeRecordPtr;
  692. /* == movie manager errors == */
  693. enum {
  694.     errInvalidTrackType         = -2300,
  695.     errCurrentSceneOnly         = -2301,
  696.     errNoSuchScene              = -2302,
  697.     errCantCoerceValue          = -2303,
  698.     errPropNotSupported         = -2304,
  699.     errCmdNotSupported          = -2305,
  700.     errParamCountOutOfBounds    = -2306,
  701.     errNotImplementedYet        = -2307,
  702.     errBadLanguageForThisMovie  = -2308,
  703.     errReadOnly                 = -2319,
  704.     errInvalidTimeForThisMovie  = -2310,
  705.     errNoExporterSet            = -2311,
  706.     errMovieNotEditable         = -2312
  707. };
  708. /*
  709.    **
  710.    == messaging callback ==
  711. */
  712. typedef CALLBACK_API( OSErr , MovieManagerFilterProcPtr )(Movie movie, MovieController mc, OSType eventType, MMgrEventRecord *evt, void *evtData, void *refCon);
  713. typedef STACK_UPP_TYPE(MovieManagerFilterProcPtr)               MovieManagerFilterUPP;
  714. /* == selector ranges == */
  715. enum {
  716.     selectorRange_MooVMgr       = 0x0000
  717. };
  718. enum {
  719.     kMovieManagerCompType       = FOUR_CHAR_CODE('mngr'),
  720.     kMovieManagerSubType        = FOUR_CHAR_CODE('moov')
  721. };
  722. enum {
  723.     kMooVMgrSetMovieSelect      = selectorRange_MooVMgr + 1,
  724.     kMooVMgrGetMovieSelect      = 0x0002,
  725.     kMooVMgrSetMovieControllerSelect = 0x0003,
  726.     kMooVMgrGetMovieControllerSelect = 0x0004,
  727.     kMooVMgrObjectExistsSelect  = 0x0005,
  728.     kMooVMgrCountObjectsSelect  = 0x0006,
  729.     kMooVMgrSendMessageToObjectSelect = 0x0007,
  730.     kMooVMgrMapNameToIDSelect   = 0x0008,
  731.     kMooVMgrCoerceValueToTypeSelect = 0x0009,
  732.     kMooVMgrSetNotificationFlagsSelect = 0x000A,
  733.     kMooVMgrGetNotificationFlagsSelect = 0x000B,
  734.     kMooVMgrSetNotificationProcSelect = 0x000C,
  735.     kMooVMgrGetObjectProperty   = 0x000D,
  736.     kMooVMgrSetObjectProperty   = 0x000E
  737. };
  738. /* = standard component stuff = */
  739. #if CALL_NOT_IN_CARBON
  740. EXTERN_API( ComponentResult )
  741. MovieManagerOpen                (MovieManagerComponent  moovMgr,
  742.                                  ComponentInstance      self)                               FIVEWORDINLINE(0x2F3C, 0x0004, 0xFFFF, 0x7000, 0xA82A);
  743. EXTERN_API( ComponentResult )
  744. MovieManagerClose               (MovieManagerComponent  moovMgr,
  745.                                  ComponentInstance      self)                               FIVEWORDINLINE(0x2F3C, 0x0004, 0xFFFE, 0x7000, 0xA82A);
  746. EXTERN_API( ComponentResult )
  747. MovieManagerCanDo               (MovieManagerComponent  moovMgr,
  748.                                  SInt16                 ftnNumber)                          FIVEWORDINLINE(0x2F3C, 0x0002, 0xFFFD, 0x7000, 0xA82A);
  749. EXTERN_API( ComponentResult )
  750. MovieManagerVersion             (MovieManagerComponent  moovMgr)                            FIVEWORDINLINE(0x2F3C, 0x0000, 0xFFFC, 0x7000, 0xA82A);
  751. EXTERN_API( ComponentResult )
  752. MovieManagerTarget              (MovieManagerComponent  moovMgr,
  753.                                  ComponentInstance      target)                             FIVEWORDINLINE(0x2F3C, 0x0004, 0xFFFA, 0x7000, 0xA82A);
  754. /* = initialization, hierarchy, editing = */
  755. EXTERN_API( ComponentResult )
  756. MovieManagerSetMovie            (MovieManagerComponent  moovMgr,
  757.                                  Movie                  movie)                              FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
  758. EXTERN_API( ComponentResult )
  759. MovieManagerGetMovie            (MovieManagerComponent  moovMgr,
  760.                                  Movie *                movie)                              FIVEWORDINLINE(0x2F3C, 0x0004, 0x0002, 0x7000, 0xA82A);
  761. EXTERN_API( ComponentResult )
  762. MovieManagerSetMovieController  (MovieManagerComponent  moovMgr,
  763.                                  MovieController        controller)                         FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
  764. EXTERN_API( ComponentResult )
  765. MovieManagerGetMovieController  (MovieManagerComponent  moovMgr,
  766.                                  MovieController *      controller)                         FIVEWORDINLINE(0x2F3C, 0x0004, 0x0004, 0x7000, 0xA82A);
  767. /* = movie objects = */
  768. EXTERN_API( ComponentResult )
  769. MovieManagerObjectExists        (MovieManagerComponent  moovMgr,
  770.                                  MovieObjectSpec *      objectSpec,
  771.                                  Boolean *              exists)                             FIVEWORDINLINE(0x2F3C, 0x0008, 0x0005, 0x7000, 0xA82A);
  772. EXTERN_API( ComponentResult )
  773. MovieManagerCountObjects        (MovieManagerComponent  moovMgr,
  774.                                  OSType                 countClass,
  775.                                  MovieObjectSpec *      objectSpec,
  776.                                  SInt32 *               count)                              FIVEWORDINLINE(0x2F3C, 0x000C, 0x0006, 0x7000, 0xA82A);
  777. /* = property/message = */
  778. EXTERN_API( ComponentResult )
  779. MovieManagerSendMessageToObject (MovieManagerComponent  moovMgr,
  780.                                  MovieObjectSpec *      objectSpec,
  781.                                  MessageClass           msgClass,
  782.                                  MessageID              msgID,
  783.                                  PropertyParams *       params)                             FIVEWORDINLINE(0x2F3C, 0x0010, 0x0007, 0x7000, 0xA82A);
  784. EXTERN_API( ComponentResult )
  785. MovieManagerMapNameToID         (MovieManagerComponent  moovMgr,
  786.                                  StringPtr              name,
  787.                                  OSType *               id)                                 FIVEWORDINLINE(0x2F3C, 0x0008, 0x0008, 0x7000, 0xA82A);
  788. EXTERN_API( ComponentResult )
  789. MovieManagerCoerceValueToType   (MovieManagerComponent  moovMgr,
  790.                                  PropArgU *             dst,
  791.                                  ValueFormat            dstType,
  792.                                  PropArgU *             src)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0009, 0x7000, 0xA82A);
  793. /* = notification */
  794. EXTERN_API( ComponentResult )
  795. MovieManagerSetNotificationFlags (MovieManagerComponent  moovMgr,
  796.                                  UInt32                 flags,
  797.                                  UInt32                 flagsMask)                          FIVEWORDINLINE(0x2F3C, 0x0008, 0x000A, 0x7000, 0xA82A);
  798. EXTERN_API( ComponentResult )
  799. MovieManagerGetNotificationFlags (MovieManagerComponent  moovMgr,
  800.                                  UInt32 *               flags)                              FIVEWORDINLINE(0x2F3C, 0x0004, 0x000B, 0x7000, 0xA82A);
  801. EXTERN_API( ComponentResult )
  802. MovieManagerSetNotificationProc (MovieManagerComponent  moovMgr,
  803.                                  MovieManagerFilterUPP  callback,
  804.                                  const void *           refCon,
  805.                                  UInt32                 flags)                              FIVEWORDINLINE(0x2F3C, 0x000C, 0x000C, 0x7000, 0xA82A);
  806. /* = obsolete, to be removed after OS X beta*/
  807. EXTERN_API( ComponentResult )
  808. MovieManagerGetObjectProperty   (MovieManagerComponent  moovMgr,
  809.                                  MovieObjectSpec *      objectSpec,
  810.                                  PropertyID             propID,
  811.                                  PropertyParams *       params)                             FIVEWORDINLINE(0x2F3C, 0x000C, 0x000D, 0x7000, 0xA82A);
  812. EXTERN_API( ComponentResult )
  813. MovieManagerSetObjectProperty   (MovieManagerComponent  moovMgr,
  814.                                  MovieObjectSpec *      objectSpec,
  815.                                  PropertyID             propID,
  816.                                  PropertyParams *       params)                             FIVEWORDINLINE(0x2F3C, 0x000C, 0x000E, 0x7000, 0xA82A);
  817. /* selectors for component calls */
  818. enum {
  819.     kMovieManagerOpenSelect                    = -1,
  820.     kMovieManagerCloseSelect                   = -2,
  821.     kMovieManagerCanDoSelect                   = -3,
  822.     kMovieManagerVersionSelect                 = -4,
  823.     kMovieManagerTargetSelect                  = -6,
  824.     kMovieManagerSetMovieSelect                = 0x0001,
  825.     kMovieManagerGetMovieSelect                = 0x0002,
  826.     kMovieManagerSetMovieControllerSelect      = 0x0003,
  827.     kMovieManagerGetMovieControllerSelect      = 0x0004,
  828.     kMovieManagerObjectExistsSelect            = 0x0005,
  829.     kMovieManagerCountObjectsSelect            = 0x0006,
  830.     kMovieManagerSendMessageToObjectSelect     = 0x0007,
  831.     kMovieManagerMapNameToIDSelect             = 0x0008,
  832.     kMovieManagerCoerceValueToTypeSelect       = 0x0009,
  833.     kMovieManagerSetNotificationFlagsSelect    = 0x000A,
  834.     kMovieManagerGetNotificationFlagsSelect    = 0x000B,
  835.     kMovieManagerSetNotificationProcSelect     = 0x000C,
  836.     kMovieManagerGetObjectPropertySelect       = 0x000D,
  837.     kMovieManagerSetObjectPropertySelect       = 0x000E
  838. };
  839. #endif  /* CALL_NOT_IN_CARBON */
  840. #if OPAQUE_UPP_TYPES
  841. #if CALL_NOT_IN_CARBON
  842.     EXTERN_API(MovieManagerFilterUPP)
  843.     NewMovieManagerFilterUPP       (MovieManagerFilterProcPtr userRoutine);
  844.     EXTERN_API(void)
  845.     DisposeMovieManagerFilterUPP    (MovieManagerFilterUPP  userUPP);
  846.     EXTERN_API(OSErr)
  847.     InvokeMovieManagerFilterUPP    (Movie                   movie,
  848.                                     MovieController         mc,
  849.                                     OSType                  eventType,
  850.                                     MMgrEventRecord *       evt,
  851.                                     void *                  evtData,
  852.                                     void *                  refCon,
  853.                                     MovieManagerFilterUPP   userUPP);
  854. #endif  /* CALL_NOT_IN_CARBON */
  855. #else
  856.     enum { uppMovieManagerFilterProcInfo = 0x0003FFE0 };            /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  857.     #define NewMovieManagerFilterUPP(userRoutine)                   (MovieManagerFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMovieManagerFilterProcInfo, GetCurrentArchitecture())
  858.     #define DisposeMovieManagerFilterUPP(userUPP)                   DisposeRoutineDescriptor(userUPP)
  859.     #define InvokeMovieManagerFilterUPP(movie, mc, eventType, evt, evtData, refCon, userUPP)  (OSErr)CALL_SIX_PARAMETER_UPP((userUPP), uppMovieManagerFilterProcInfo, (movie), (mc), (eventType), (evt), (evtData), (refCon))
  860. #endif
  861. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  862. #define NewMovieManagerFilterProc(userRoutine)                  NewMovieManagerFilterUPP(userRoutine)
  863. #define CallMovieManagerFilterProc(userRoutine, movie, mc, eventType, evt, evtData, refCon) InvokeMovieManagerFilterUPP(movie, mc, eventType, evt, evtData, refCon, userRoutine)
  864. #if PRAGMA_STRUCT_ALIGN
  865.     #pragma options align=reset
  866. #elif PRAGMA_STRUCT_PACKPUSH
  867.     #pragma pack(pop)
  868. #elif PRAGMA_STRUCT_PACK
  869.     #pragma pack()
  870. #endif
  871. #ifdef PRAGMA_IMPORT_OFF
  872. #pragma import off
  873. #elif PRAGMA_IMPORT
  874. #pragma import reset
  875. #endif
  876. #ifdef __cplusplus
  877. }
  878. #endif
  879. #endif /* __MOVIEMANAGER__ */