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

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       QuickTimeVR.h
  3.  
  4.      Contains:   QuickTime VR interfaces
  5.  
  6.      Version:    Technology: QuickTime VR 5.0
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1997-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 __QUICKTIMEVR__
  18. #define __QUICKTIMEVR__
  19. #ifndef __CONDITIONALMACROS__
  20. #include "ConditionalMacros.h"
  21. #endif
  22. #ifndef __DIALOGS__
  23. #include "Dialogs.h"
  24. #endif
  25. #ifndef __MOVIES__
  26. #include "Movies.h"
  27. #endif
  28. #if PRAGMA_ONCE
  29. #pragma once
  30. #endif
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. #if PRAGMA_IMPORT
  35. #pragma import on
  36. #endif
  37. #if PRAGMA_STRUCT_ALIGN
  38.     #pragma options align=mac68k
  39. #elif PRAGMA_STRUCT_PACKPUSH
  40.     #pragma pack(push, 2)
  41. #elif PRAGMA_STRUCT_PACK
  42.     #pragma pack(2)
  43. #endif
  44. typedef struct OpaqueQTVRInstance*      QTVRInstance;
  45. /* Released API Version numbers */
  46. #define kQTVRAPIMajorVersion05  (0x05)
  47. #define kQTVRAPIMajorVersion02  (0x02)
  48. #define kQTVRAPIMinorVersion00  (0x00)
  49. #define kQTVRAPIMinorVersion01  (0x01)
  50. #define kQTVRAPIMinorVersion10  (0x10)
  51. #define kQTVRAPIMinorVersion20  (0x20)
  52. /* Version numbers for the API described in this header */
  53. #define kQTVRAPIMajorVersion kQTVRAPIMajorVersion05
  54. #define kQTVRAPIMinorVersion kQTVRAPIMinorVersion00
  55. enum {
  56.     kQTVRControllerSubType      = FOUR_CHAR_CODE('ctyp'),
  57.     kQTVRQTVRType               = FOUR_CHAR_CODE('qtvr'),
  58.     kQTVRPanoramaType           = FOUR_CHAR_CODE('pano'),
  59.     kQTVRObjectType             = FOUR_CHAR_CODE('obje'),
  60.     kQTVROldPanoType            = FOUR_CHAR_CODE('STpn'),       /* Used in QTVR 1.0 release*/
  61.     kQTVROldObjectType          = FOUR_CHAR_CODE('stna')        /* Used in QTVR 1.0 release*/
  62. };
  63. #if TARGET_OS_MAC && !TARGET_API_MAC_OSX
  64. #define kQTVRUnknownType '????'     /* Unknown node type */
  65. #else
  66. #define kQTVRUnknownType '????' /* Unknown node type */
  67. #endif  /* TARGET_OS_MAC && !TARGET_API_MAC_OSX */
  68. /* QTVR hot spot types*/
  69. enum {
  70.     kQTVRHotSpotLinkType        = FOUR_CHAR_CODE('link'),
  71.     kQTVRHotSpotURLType         = FOUR_CHAR_CODE('url '),
  72.     kQTVRHotSpotUndefinedType   = FOUR_CHAR_CODE('undf')
  73. };
  74. /* Special Values for nodeID in QTVRGoToNodeID*/
  75. enum {
  76.     kQTVRCurrentNode            = 0,
  77.     kQTVRPreviousNode           = (long)0x80000000,
  78.     kQTVRDefaultNode            = (long)0x80000001
  79. };
  80. /* Panorama correction modes used for the kQTVRImagingCorrection imaging property*/
  81. enum {
  82.     kQTVRNoCorrection           = 0,
  83.     kQTVRPartialCorrection      = 1,
  84.     kQTVRFullCorrection         = 2
  85. };
  86. /* Imaging Modes used by QTVRSetImagingProperty, QTVRGetImagingProperty, QTVRUpdate, QTVRBeginUpdate*/
  87. typedef UInt32 QTVRImagingMode;
  88. enum {
  89.     kQTVRStatic                 = 1,
  90.     kQTVRMotion                 = 2,
  91.     kQTVRCurrentMode            = 0,                            /* Special Value for QTVRUpdate*/
  92.     kQTVRAllModes               = 100                           /* Special value for QTVRSetProperty*/
  93. };
  94. /* Imaging Properties used by QTVRSetImagingProperty, QTVRGetImagingProperty*/
  95. enum {
  96.     kQTVRImagingCorrection      = 1,
  97.     kQTVRImagingQuality         = 2,
  98.     kQTVRImagingDirectDraw      = 3,
  99.     kQTVRImagingCurrentMode     = 100                           /* Get Only*/
  100. };
  101. /* OR the above with kImagingDefaultValue to get/set the default value*/
  102. enum {
  103.     kImagingDefaultValue        = (long)0x80000000
  104. };
  105. /* Transition Types used by QTVRSetTransitionProperty, QTVREnableTransition*/
  106. enum {
  107.     kQTVRTransitionSwing        = 1
  108. };
  109. /* Transition Properties QTVRSetTransitionProperty*/
  110. enum {
  111.     kQTVRTransitionSpeed        = 1,
  112.     kQTVRTransitionDirection    = 2
  113. };
  114. /* Constraint values used to construct value returned by GetConstraintStatus*/
  115. enum {
  116.     kQTVRUnconstrained          = 0L,
  117.     kQTVRCantPanLeft            = 1L << 0,
  118.     kQTVRCantPanRight           = 1L << 1,
  119.     kQTVRCantPanUp              = 1L << 2,
  120.     kQTVRCantPanDown            = 1L << 3,
  121.     kQTVRCantZoomIn             = 1L << 4,
  122.     kQTVRCantZoomOut            = 1L << 5,
  123.     kQTVRCantTranslateLeft      = 1L << 6,
  124.     kQTVRCantTranslateRight     = 1L << 7,
  125.     kQTVRCantTranslateUp        = 1L << 8,
  126.     kQTVRCantTranslateDown      = 1L << 9
  127. };
  128. /* Object-only mouse mode values used to construct value returned by QTVRGetCurrentMouseMode*/
  129. enum {
  130.     kQTVRPanning                = 1L << 0,                      /* standard objects, "object only" controllers*/
  131.     kQTVRTranslating            = 1L << 1,                      /* all objects*/
  132.     kQTVRZooming                = 1L << 2,                      /* all objects*/
  133.     kQTVRScrolling              = 1L << 3,                      /* standard object arrow scrollers and joystick object*/
  134.     kQTVRSelecting              = 1L << 4                       /* object absolute controller*/
  135. };
  136. /* Properties for use with QTVRSetInteractionProperty/GetInteractionProperty*/
  137. enum {
  138.     kQTVRInteractionMouseClickHysteresis = 1,                   /* pixels within which the mouse is considered not to have moved (UInt16)*/
  139.     kQTVRInteractionMouseClickTimeout = 2,                      /* ticks after which a mouse click times out and turns into panning (UInt32)*/
  140.     kQTVRInteractionPanTiltSpeed = 3,                           /* control the relative pan/tilt speed from 1 (slowest) to 10 (fastest). (UInt32) Default is 5;*/
  141.     kQTVRInteractionZoomSpeed   = 4,                            /* control the relative zooming speed from 1 (slowest) to 10 (fastest). (UInt32) Default is 5;*/
  142.     kQTVRInteractionTranslateOnMouseDown = 101,                 /* Holding MouseDown with this setting translates zoomed object movies (Boolean)*/
  143.     kQTVRInteractionMouseMotionScale = 102,                     /* The maximum angle of rotation caused by dragging across the display window. (* float)*/
  144.     kQTVRInteractionNudgeMode   = 103                           /* A QTVRNudgeMode: rotate, translate, or the same as the current mouse mode. Requires QTVR 2.1*/
  145. };
  146. /* OR the above with kQTVRInteractionDefaultValue to get/set the default value*/
  147. enum {
  148.     kQTVRInteractionDefaultValue = (long)0x80000000
  149. };
  150. /* Geometry constants used in QTVRSetBackBufferPrefs, QTVRGetBackBufferSettings, QTVRGetBackBufferMemInfo*/
  151. enum {
  152.     kQTVRUseMovieGeometry       = 0,
  153.     kQTVRVerticalCylinder       = FOUR_CHAR_CODE('vcyl'),
  154.     kQTVRHorizontalCylinder     = FOUR_CHAR_CODE('hcyl'),
  155.     kQTVRCube                   = FOUR_CHAR_CODE('cube')
  156. };
  157. /* Resolution constants used in QTVRSetBackBufferPrefs, QTVRGetBackBufferSettings, QTVRGetBackBufferMemInfo*/
  158. enum {
  159.     kQTVRDefaultRes             = 0,
  160.     kQTVRFullRes                = 1L << 0,
  161.     kQTVRHalfRes                = 1L << 1,
  162.     kQTVRQuarterRes             = 1L << 2
  163. };
  164. /* QTVR-specific pixelFormat constants used in QTVRSetBackBufferPrefs, QTVRGetBackBufferSettings, QTVRGetBackBufferMemInfo*/
  165. enum {
  166.     kQTVRUseMovieDepth          = 0
  167. };
  168. /* Cache Size Pref constants used in QTVRSetBackBufferPrefs, QTVRGetBackBufferSettings*/
  169. enum {
  170.     kQTVRMinimumCache           = -1,
  171.     kQTVRSuggestedCache         = 0,
  172.     kQTVRFullCache              = 1
  173. };
  174. /* Angular units used by QTVRSetAngularUnits*/
  175. typedef UInt32 QTVRAngularUnits;
  176. enum {
  177.     kQTVRDegrees                = 0,
  178.     kQTVRRadians                = 1
  179. };
  180. /* Values for enableFlag parameter in QTVREnableHotSpot*/
  181. enum {
  182.     kQTVRHotSpotID              = 0,
  183.     kQTVRHotSpotType            = 1,
  184.     kQTVRAllHotSpots            = 2
  185. };
  186. /* Values for viewParameter for QTVRSet/GetViewParameter*/
  187. enum {
  188.     kQTVRPanAngle               = 0x0100,                       /* default units; &float, &float*/
  189.     kQTVRTiltAngle              = 0x0101,                       /* default units; &float, &float*/
  190.     kQTVRFieldOfViewAngle       = 0x0103,                       /* default units; &float, &float*/
  191.     kQTVRViewCenter             = 0x0104,                       /* pixels (per object movies); &QTVRFloatPoint, &QTVRFloatPoint*/
  192.     kQTVRHotSpotsVisible        = 0x0200                        /* Boolean, &Boolean*/
  193. };
  194. /* Values for flagsIn for QTVRSet/GetViewParameter*/
  195. enum {
  196.     kQTVRValueIsRelative        = 1L << 0,                      /* Is the value absolute or relative to the current value?*/
  197.     kQTVRValueIsRate            = 1L << 1,                      /* Is the value absolute or a rate of change to be applied?*/
  198.     kQTVRValueIsUserPrefRelative = 1L << 2                      /* Is the value a percentage of the user rate pref?*/
  199. };
  200. /* Values for kind parameter in QTVRGet/SetConstraints, QTVRGetViewingLimits*/
  201. enum {
  202.     kQTVRPan                    = 0,
  203.     kQTVRTilt                   = 1,
  204.     kQTVRFieldOfView            = 2,
  205.     kQTVRViewCenterH            = 4,                            /* WrapAndConstrain only*/
  206.     kQTVRViewCenterV            = 5                             /* WrapAndConstrain only*/
  207. };
  208. /* Values for setting parameter in QTVRSetAnimationSetting, QTVRGetAnimationSetting*/
  209. typedef UInt32 QTVRObjectAnimationSetting;
  210. enum {
  211.                                                                 /* View Frame Animation Settings*/
  212.     kQTVRPalindromeViewFrames   = 1,
  213.     kQTVRStartFirstViewFrame    = 2,
  214.     kQTVRDontLoopViewFrames     = 3,
  215.     kQTVRPlayEveryViewFrame     = 4,                            /* Requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)*/
  216.                                                                 /* View Animation Settings*/
  217.     kQTVRSyncViewToFrameRate    = 16,
  218.     kQTVRPalindromeViews        = 17,
  219.     kQTVRPlayStreamingViews     = 18                            /* Requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)*/
  220. };
  221. typedef UInt32 QTVRControlSetting;
  222. enum {
  223.     kQTVRWrapPan                = 1,
  224.     kQTVRWrapTilt               = 2,
  225.     kQTVRCanZoom                = 3,
  226.     kQTVRReverseHControl        = 4,
  227.     kQTVRReverseVControl        = 5,
  228.     kQTVRSwapHVControl          = 6,
  229.     kQTVRTranslation            = 7
  230. };
  231. typedef UInt32 QTVRViewStateType;
  232. enum {
  233.     kQTVRDefault                = 0,
  234.     kQTVRCurrent                = 2,
  235.     kQTVRMouseDown              = 3
  236. };
  237. typedef UInt32 QTVRNudgeControl;
  238. enum {
  239.     kQTVRRight                  = 0,
  240.     kQTVRUpRight                = 45,
  241.     kQTVRUp                     = 90,
  242.     kQTVRUpLeft                 = 135,
  243.     kQTVRLeft                   = 180,
  244.     kQTVRDownLeft               = 225,
  245.     kQTVRDown                   = 270,
  246.     kQTVRDownRight              = 315
  247. };
  248. typedef UInt32 QTVRNudgeMode;
  249. enum {
  250.     kQTVRNudgeRotate            = 0,
  251.     kQTVRNudgeTranslate         = 1,
  252.     kQTVRNudgeSameAsMouse       = 2
  253. };
  254. /* Flags to control elements of the QTVR control bar (set via mcActionSetFlags) */
  255. enum {
  256.     mcFlagQTVRSuppressBackBtn   = 1L << 16,
  257.     mcFlagQTVRSuppressZoomBtns  = 1L << 17,
  258.     mcFlagQTVRSuppressHotSpotBtn = 1L << 18,
  259.     mcFlagQTVRSuppressTranslateBtn = 1L << 19,
  260.     mcFlagQTVRSuppressHelpText  = 1L << 20,
  261.     mcFlagQTVRSuppressHotSpotNames = 1L << 21,
  262.     mcFlagQTVRExplicitFlagSet   = 1L << 31                      /* bits 0->30 should be interpreted as "explicit on" for the corresponding suppression bits*/
  263. };
  264. /* Cursor types used in type field of QTVRCursorRecord*/
  265. enum {
  266.     kQTVRUseDefaultCursor       = 0,
  267.     kQTVRStdCursorType          = 1,
  268.     kQTVRColorCursorType        = 2
  269. };
  270. /* Values for flags parameter in QTVRMouseOverHotSpot callback*/
  271. enum {
  272.     kQTVRHotSpotEnter           = 0,
  273.     kQTVRHotSpotWithin          = 1,
  274.     kQTVRHotSpotLeave           = 2
  275. };
  276. /* Values for flags parameter in QTVRSetPrescreenImagingCompleteProc*/
  277. enum {
  278.     kQTVRPreScreenEveryIdle     = 1L << 0                       /* Requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)*/
  279. };
  280. /* Values for flags field of areasOfInterest in QTVRSetBackBufferImagingProc*/
  281. enum {
  282.     kQTVRBackBufferEveryUpdate  = 1L << 0,
  283.     kQTVRBackBufferEveryIdle    = 1L << 1,
  284.     kQTVRBackBufferAlwaysRefresh = 1L << 2,
  285.     kQTVRBackBufferHorizontal   = 1L << 3                       /* Requires that backbuffer proc be long-rowBytes aware (gestaltQDHasLongRowBytes)*/
  286. };
  287. /* Values for flagsIn parameter in QTVRBackBufferImaging callback*/
  288. enum {
  289.     kQTVRBackBufferRectVisible  = 1L << 0,
  290.     kQTVRBackBufferWasRefreshed = 1L << 1
  291. };
  292. /* Values for flagsOut parameter in QTVRBackBufferImaging callback*/
  293. enum {
  294.     kQTVRBackBufferFlagDidDraw  = 1L << 0,
  295.     kQTVRBackBufferFlagLastFlag = 1L << 31
  296. };
  297. /* QTVRCursorRecord used in QTVRReplaceCursor*/
  298. struct QTVRCursorRecord {
  299.     UInt16                          theType;                    /* field was previously named "type"*/
  300.     SInt16                          rsrcID;
  301.     Handle                          handle;
  302. };
  303. typedef struct QTVRCursorRecord         QTVRCursorRecord;
  304. struct QTVRFloatPoint {
  305.     float                           x;
  306.     float                           y;
  307. };
  308. typedef struct QTVRFloatPoint           QTVRFloatPoint;
  309. /* Struct used for areasOfInterest parameter in QTVRSetBackBufferImagingProc*/
  310. struct QTVRAreaOfInterest {
  311.     float                           panAngle;
  312.     float                           tiltAngle;
  313.     float                           width;
  314.     float                           height;
  315.     UInt32                          flags;
  316. };
  317. typedef struct QTVRAreaOfInterest       QTVRAreaOfInterest;
  318. /*
  319.   =================================================================================================
  320.    Callback routines 
  321.   -------------------------------------------------------------------------------------------------
  322. */
  323. typedef CALLBACK_API( OSErr , QTVRLeavingNodeProcPtr )(QTVRInstance qtvr, UInt32 fromNodeID, UInt32 toNodeID, Boolean *cancel, SInt32 refCon);
  324. typedef CALLBACK_API( OSErr , QTVREnteringNodeProcPtr )(QTVRInstance qtvr, UInt32 nodeID, SInt32 refCon);
  325. typedef CALLBACK_API( OSErr , QTVRMouseOverHotSpotProcPtr )(QTVRInstance qtvr, UInt32 hotSpotID, UInt32 flags, SInt32 refCon);
  326. typedef CALLBACK_API( OSErr , QTVRImagingCompleteProcPtr )(QTVRInstance qtvr, SInt32 refCon);
  327. typedef CALLBACK_API( OSErr , QTVRBackBufferImagingProcPtr )(QTVRInstance qtvr, Rect *drawRect, UInt16 areaIndex, UInt32 flagsIn, UInt32 *flagsOut, SInt32 refCon);
  328. typedef STACK_UPP_TYPE(QTVRLeavingNodeProcPtr)                  QTVRLeavingNodeUPP;
  329. typedef STACK_UPP_TYPE(QTVREnteringNodeProcPtr)                 QTVREnteringNodeUPP;
  330. typedef STACK_UPP_TYPE(QTVRMouseOverHotSpotProcPtr)             QTVRMouseOverHotSpotUPP;
  331. typedef STACK_UPP_TYPE(QTVRImagingCompleteProcPtr)              QTVRImagingCompleteUPP;
  332. typedef STACK_UPP_TYPE(QTVRBackBufferImagingProcPtr)            QTVRBackBufferImagingUPP;
  333. #if OPAQUE_UPP_TYPES
  334.     EXTERN_API(QTVRLeavingNodeUPP)
  335.     NewQTVRLeavingNodeUPP          (QTVRLeavingNodeProcPtr  userRoutine);
  336.     EXTERN_API(QTVREnteringNodeUPP)
  337.     NewQTVREnteringNodeUPP         (QTVREnteringNodeProcPtr userRoutine);
  338.     EXTERN_API(QTVRMouseOverHotSpotUPP)
  339.     NewQTVRMouseOverHotSpotUPP     (QTVRMouseOverHotSpotProcPtr userRoutine);
  340.     EXTERN_API(QTVRImagingCompleteUPP)
  341.     NewQTVRImagingCompleteUPP      (QTVRImagingCompleteProcPtr userRoutine);
  342.     EXTERN_API(QTVRBackBufferImagingUPP)
  343.     NewQTVRBackBufferImagingUPP    (QTVRBackBufferImagingProcPtr userRoutine);
  344.     EXTERN_API(void)
  345.     DisposeQTVRLeavingNodeUPP      (QTVRLeavingNodeUPP      userUPP);
  346.     EXTERN_API(void)
  347.     DisposeQTVREnteringNodeUPP     (QTVREnteringNodeUPP     userUPP);
  348.     EXTERN_API(void)
  349.     DisposeQTVRMouseOverHotSpotUPP    (QTVRMouseOverHotSpotUPP userUPP);
  350.     EXTERN_API(void)
  351.     DisposeQTVRImagingCompleteUPP    (QTVRImagingCompleteUPP userUPP);
  352.     EXTERN_API(void)
  353.     DisposeQTVRBackBufferImagingUPP    (QTVRBackBufferImagingUPP userUPP);
  354.     EXTERN_API(OSErr)
  355.     InvokeQTVRLeavingNodeUPP       (QTVRInstance            qtvr,
  356.                                     UInt32                  fromNodeID,
  357.                                     UInt32                  toNodeID,
  358.                                     Boolean *               cancel,
  359.                                     SInt32                  refCon,
  360.                                     QTVRLeavingNodeUPP      userUPP);
  361.     EXTERN_API(OSErr)
  362.     InvokeQTVREnteringNodeUPP      (QTVRInstance            qtvr,
  363.                                     UInt32                  nodeID,
  364.                                     SInt32                  refCon,
  365.                                     QTVREnteringNodeUPP     userUPP);
  366.     EXTERN_API(OSErr)
  367.     InvokeQTVRMouseOverHotSpotUPP    (QTVRInstance          qtvr,
  368.                                     UInt32                  hotSpotID,
  369.                                     UInt32                  flags,
  370.                                     SInt32                  refCon,
  371.                                     QTVRMouseOverHotSpotUPP userUPP);
  372.     EXTERN_API(OSErr)
  373.     InvokeQTVRImagingCompleteUPP    (QTVRInstance           qtvr,
  374.                                     SInt32                  refCon,
  375.                                     QTVRImagingCompleteUPP  userUPP);
  376.     EXTERN_API(OSErr)
  377.     InvokeQTVRBackBufferImagingUPP    (QTVRInstance         qtvr,
  378.                                     Rect *                  drawRect,
  379.                                     UInt16                  areaIndex,
  380.                                     UInt32                  flagsIn,
  381.                                     UInt32 *                flagsOut,
  382.                                     SInt32                  refCon,
  383.                                     QTVRBackBufferImagingUPP userUPP);
  384. #else
  385.     enum { uppQTVRLeavingNodeProcInfo = 0x0000FFE0 };               /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  386.     enum { uppQTVREnteringNodeProcInfo = 0x00000FE0 };              /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  387.     enum { uppQTVRMouseOverHotSpotProcInfo = 0x00003FE0 };          /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  388.     enum { uppQTVRImagingCompleteProcInfo = 0x000003E0 };           /* pascal 2_bytes Func(4_bytes, 4_bytes) */
  389.     enum { uppQTVRBackBufferImagingProcInfo = 0x0003FBE0 };         /* pascal 2_bytes Func(4_bytes, 4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes) */
  390.     #define NewQTVRLeavingNodeUPP(userRoutine)                      (QTVRLeavingNodeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVRLeavingNodeProcInfo, GetCurrentArchitecture())
  391.     #define NewQTVREnteringNodeUPP(userRoutine)                     (QTVREnteringNodeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVREnteringNodeProcInfo, GetCurrentArchitecture())
  392.     #define NewQTVRMouseOverHotSpotUPP(userRoutine)                 (QTVRMouseOverHotSpotUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVRMouseOverHotSpotProcInfo, GetCurrentArchitecture())
  393.     #define NewQTVRImagingCompleteUPP(userRoutine)                  (QTVRImagingCompleteUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVRImagingCompleteProcInfo, GetCurrentArchitecture())
  394.     #define NewQTVRBackBufferImagingUPP(userRoutine)                (QTVRBackBufferImagingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVRBackBufferImagingProcInfo, GetCurrentArchitecture())
  395.     #define DisposeQTVRLeavingNodeUPP(userUPP)                      DisposeRoutineDescriptor(userUPP)
  396.     #define DisposeQTVREnteringNodeUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  397.     #define DisposeQTVRMouseOverHotSpotUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  398.     #define DisposeQTVRImagingCompleteUPP(userUPP)                  DisposeRoutineDescriptor(userUPP)
  399.     #define DisposeQTVRBackBufferImagingUPP(userUPP)                DisposeRoutineDescriptor(userUPP)
  400.     #define InvokeQTVRLeavingNodeUPP(qtvr, fromNodeID, toNodeID, cancel, refCon, userUPP)  (OSErr)CALL_FIVE_PARAMETER_UPP((userUPP), uppQTVRLeavingNodeProcInfo, (qtvr), (fromNodeID), (toNodeID), (cancel), (refCon))
  401.     #define InvokeQTVREnteringNodeUPP(qtvr, nodeID, refCon, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppQTVREnteringNodeProcInfo, (qtvr), (nodeID), (refCon))
  402.     #define InvokeQTVRMouseOverHotSpotUPP(qtvr, hotSpotID, flags, refCon, userUPP)  (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppQTVRMouseOverHotSpotProcInfo, (qtvr), (hotSpotID), (flags), (refCon))
  403.     #define InvokeQTVRImagingCompleteUPP(qtvr, refCon, userUPP)     (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppQTVRImagingCompleteProcInfo, (qtvr), (refCon))
  404.     #define InvokeQTVRBackBufferImagingUPP(qtvr, drawRect, areaIndex, flagsIn, flagsOut, refCon, userUPP)  (OSErr)CALL_SIX_PARAMETER_UPP((userUPP), uppQTVRBackBufferImagingProcInfo, (qtvr), (drawRect), (areaIndex), (flagsIn), (flagsOut), (refCon))
  405. #endif
  406. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  407. #define NewQTVRLeavingNodeProc(userRoutine)                     NewQTVRLeavingNodeUPP(userRoutine)
  408. #define NewQTVREnteringNodeProc(userRoutine)                    NewQTVREnteringNodeUPP(userRoutine)
  409. #define NewQTVRMouseOverHotSpotProc(userRoutine)                NewQTVRMouseOverHotSpotUPP(userRoutine)
  410. #define NewQTVRImagingCompleteProc(userRoutine)                 NewQTVRImagingCompleteUPP(userRoutine)
  411. #define NewQTVRBackBufferImagingProc(userRoutine)               NewQTVRBackBufferImagingUPP(userRoutine)
  412. #define CallQTVRLeavingNodeProc(userRoutine, qtvr, fromNodeID, toNodeID, cancel, refCon) InvokeQTVRLeavingNodeUPP(qtvr, fromNodeID, toNodeID, cancel, refCon, userRoutine)
  413. #define CallQTVREnteringNodeProc(userRoutine, qtvr, nodeID, refCon) InvokeQTVREnteringNodeUPP(qtvr, nodeID, refCon, userRoutine)
  414. #define CallQTVRMouseOverHotSpotProc(userRoutine, qtvr, hotSpotID, flags, refCon) InvokeQTVRMouseOverHotSpotUPP(qtvr, hotSpotID, flags, refCon, userRoutine)
  415. #define CallQTVRImagingCompleteProc(userRoutine, qtvr, refCon)  InvokeQTVRImagingCompleteUPP(qtvr, refCon, userRoutine)
  416. #define CallQTVRBackBufferImagingProc(userRoutine, qtvr, drawRect, areaIndex, flagsIn, flagsOut, refCon) InvokeQTVRBackBufferImagingUPP(qtvr, drawRect, areaIndex, flagsIn, flagsOut, refCon, userRoutine)
  417. /*
  418.   =================================================================================================
  419.     QTVR Intercept Struct, Callback, Routine Descriptors 
  420.   -------------------------------------------------------------------------------------------------
  421. */
  422. typedef UInt32 QTVRProcSelector;
  423. enum {
  424.     kQTVRSetPanAngleSelector    = 0x2000,
  425.     kQTVRSetTiltAngleSelector   = 0x2001,
  426.     kQTVRSetFieldOfViewSelector = 0x2002,
  427.     kQTVRSetViewCenterSelector  = 0x2003,
  428.     kQTVRMouseEnterSelector     = 0x2004,
  429.     kQTVRMouseWithinSelector    = 0x2005,
  430.     kQTVRMouseLeaveSelector     = 0x2006,
  431.     kQTVRMouseDownSelector      = 0x2007,
  432.     kQTVRMouseStillDownSelector = 0x2008,
  433.     kQTVRMouseUpSelector        = 0x2009,
  434.     kQTVRTriggerHotSpotSelector = 0x200A,
  435.     kQTVRGetHotSpotTypeSelector = 0x200B,                       /* Requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)*/
  436.     kQTVRSetViewParameterSelector = 0x200C,                     /* Requires QTVR 5.0 (kQTVRAPIMajorVersion05 + kQTVRAPIMinorVersion00)*/
  437.     kQTVRGetViewParameterSelector = 0x200D                      /* Requires QTVR 5.0 (kQTVRAPIMajorVersion05 + kQTVRAPIMinorVersion00)*/
  438. };
  439. struct QTVRInterceptRecord {
  440.     SInt32                          reserved1;
  441.     SInt32                          selector;
  442.     SInt32                          reserved2;
  443.     SInt32                          reserved3;
  444.     SInt32                          paramCount;
  445.     void *                          parameter[6];
  446. };
  447. typedef struct QTVRInterceptRecord      QTVRInterceptRecord;
  448. typedef QTVRInterceptRecord *           QTVRInterceptPtr;
  449. /* Prototype for Intercept Proc callback*/
  450. typedef CALLBACK_API( void , QTVRInterceptProcPtr )(QTVRInstance qtvr, QTVRInterceptPtr qtvrMsg, SInt32 refCon, Boolean *cancel);
  451. typedef STACK_UPP_TYPE(QTVRInterceptProcPtr)                    QTVRInterceptUPP;
  452. #if OPAQUE_UPP_TYPES
  453.     EXTERN_API(QTVRInterceptUPP)
  454.     NewQTVRInterceptUPP            (QTVRInterceptProcPtr    userRoutine);
  455.     EXTERN_API(void)
  456.     DisposeQTVRInterceptUPP        (QTVRInterceptUPP        userUPP);
  457.     EXTERN_API(void)
  458.     InvokeQTVRInterceptUPP         (QTVRInstance            qtvr,
  459.                                     QTVRInterceptPtr        qtvrMsg,
  460.                                     SInt32                  refCon,
  461.                                     Boolean *               cancel,
  462.                                     QTVRInterceptUPP        userUPP);
  463. #else
  464.     enum { uppQTVRInterceptProcInfo = 0x00003FC0 };                 /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  465.     #define NewQTVRInterceptUPP(userRoutine)                        (QTVRInterceptUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVRInterceptProcInfo, GetCurrentArchitecture())
  466.     #define DisposeQTVRInterceptUPP(userUPP)                        DisposeRoutineDescriptor(userUPP)
  467.     #define InvokeQTVRInterceptUPP(qtvr, qtvrMsg, refCon, cancel, userUPP)  CALL_FOUR_PARAMETER_UPP((userUPP), uppQTVRInterceptProcInfo, (qtvr), (qtvrMsg), (refCon), (cancel))
  468. #endif
  469. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  470. #define NewQTVRInterceptProc(userRoutine)                       NewQTVRInterceptUPP(userRoutine)
  471. #define CallQTVRInterceptProc(userRoutine, qtvr, qtvrMsg, refCon, cancel) InvokeQTVRInterceptUPP(qtvr, qtvrMsg, refCon, cancel, userRoutine)
  472. /*
  473.   =================================================================================================
  474.     Initialization QTVR calls 
  475.   -------------------------------------------------------------------------------------------------
  476.    Requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10) and only work on Non-Macintosh platforms
  477. */
  478. #if !TARGET_OS_MAC
  479. #if CALL_NOT_IN_CARBON
  480. EXTERN_API_C( OSErr )
  481. InitializeQTVR                  (void);
  482. EXTERN_API_C( OSErr )
  483. TerminateQTVR                   (void);
  484. #endif  /* CALL_NOT_IN_CARBON */
  485. #endif  /* !TARGET_OS_MAC */
  486. /*
  487.   =================================================================================================
  488.     General QTVR calls 
  489.   -------------------------------------------------------------------------------------------------
  490. */
  491. EXTERN_API_C( Track )
  492. QTVRGetQTVRTrack                (Movie                  theMovie,
  493.                                  SInt32                 index);
  494. EXTERN_API_C( OSErr )
  495. QTVRGetQTVRInstance             (QTVRInstance *         qtvr,
  496.                                  Track                  qtvrTrack,
  497.                                  MovieController        mc);
  498. /*
  499.   =================================================================================================
  500.     Viewing Angles and Zooming 
  501.   -------------------------------------------------------------------------------------------------
  502. */
  503. /* QTVRSetViewParameter requires QTVR 5.0 (kQTVRAPIMajorVersion05 + kQTVRAPIMinorVersion00)*/
  504. EXTERN_API_C( OSErr )
  505. QTVRSetViewParameter            (QTVRInstance           qtvr,
  506.                                  UInt32                 viewParameter,
  507.                                  void *                 value,
  508.                                  UInt32                 flagsIn);
  509. /* QTVRGetViewParameter requires QTVR 5.0 (kQTVRAPIMajorVersion05 + kQTVRAPIMinorVersion00)*/
  510. EXTERN_API_C( OSErr )
  511. QTVRGetViewParameter            (QTVRInstance           qtvr,
  512.                                  UInt32                 viewParameter,
  513.                                  void *                 value,
  514.                                  UInt32                 flagsIn,
  515.                                  UInt32 *               flagsOut);
  516. EXTERN_API_C( OSErr )
  517. QTVRSetPanAngle                 (QTVRInstance           qtvr,
  518.                                  float                  panAngle);
  519. EXTERN_API_C( float )
  520. QTVRGetPanAngle                 (QTVRInstance           qtvr);
  521. EXTERN_API_C( OSErr )
  522. QTVRSetTiltAngle                (QTVRInstance           qtvr,
  523.                                  float                  tiltAngle);
  524. EXTERN_API_C( float )
  525. QTVRGetTiltAngle                (QTVRInstance           qtvr);
  526. EXTERN_API_C( OSErr )
  527. QTVRSetFieldOfView              (QTVRInstance           qtvr,
  528.                                  float                  fieldOfView);
  529. EXTERN_API_C( float )
  530. QTVRGetFieldOfView              (QTVRInstance           qtvr);
  531. EXTERN_API_C( OSErr )
  532. QTVRShowDefaultView             (QTVRInstance           qtvr);
  533. /* Object Specific*/
  534. EXTERN_API_C( OSErr )
  535. QTVRSetViewCenter               (QTVRInstance           qtvr,
  536.                                  const QTVRFloatPoint * viewCenter);
  537. EXTERN_API_C( OSErr )
  538. QTVRGetViewCenter               (QTVRInstance           qtvr,
  539.                                  QTVRFloatPoint *       viewCenter);
  540. EXTERN_API_C( OSErr )
  541. QTVRNudge                       (QTVRInstance           qtvr,
  542.                                  QTVRNudgeControl       direction);
  543. /* QTVRInteractionNudge requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)*/
  544. EXTERN_API_C( OSErr )
  545. QTVRInteractionNudge            (QTVRInstance           qtvr,
  546.                                  QTVRNudgeControl       direction);
  547. /*
  548.   =================================================================================================
  549.     Scene and Node Location Information 
  550.   -------------------------------------------------------------------------------------------------
  551. */
  552. EXTERN_API_C( OSErr )
  553. QTVRGetVRWorld                  (QTVRInstance           qtvr,
  554.                                  QTAtomContainer *      VRWorld);
  555. EXTERN_API_C( OSErr )
  556. QTVRGetNodeInfo                 (QTVRInstance           qtvr,
  557.                                  UInt32                 nodeID,
  558.                                  QTAtomContainer *      nodeInfo);
  559. EXTERN_API_C( OSErr )
  560. QTVRGoToNodeID                  (QTVRInstance           qtvr,
  561.                                  UInt32                 nodeID);
  562. EXTERN_API_C( UInt32 )
  563. QTVRGetCurrentNodeID            (QTVRInstance           qtvr);
  564. EXTERN_API_C( OSType )
  565. QTVRGetNodeType                 (QTVRInstance           qtvr,
  566.                                  UInt32                 nodeID);
  567. /*
  568.   =================================================================================================
  569.     Hot Spot related calls 
  570.   -------------------------------------------------------------------------------------------------
  571. */
  572. EXTERN_API_C( OSErr )
  573. QTVRPtToHotSpotID               (QTVRInstance           qtvr,
  574.                                  Point                  pt,
  575.                                  UInt32 *               hotSpotID);
  576. /* QTVRGetHotSpotType requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)*/
  577. EXTERN_API_C( OSErr )
  578. QTVRGetHotSpotType              (QTVRInstance           qtvr,
  579.                                  UInt32                 hotSpotID,
  580.                                  OSType *               hotSpotType);
  581. EXTERN_API_C( OSErr )
  582. QTVRTriggerHotSpot              (QTVRInstance           qtvr,
  583.                                  UInt32                 hotSpotID,
  584.                                  QTAtomContainer        nodeInfo,
  585.                                  QTAtom                 selectedAtom);
  586. EXTERN_API_C( OSErr )
  587. QTVRSetMouseOverHotSpotProc     (QTVRInstance           qtvr,
  588.                                  QTVRMouseOverHotSpotUPP  mouseOverHotSpotProc,
  589.                                  SInt32                 refCon,
  590.                                  UInt32                 flags);
  591. EXTERN_API_C( OSErr )
  592. QTVREnableHotSpot               (QTVRInstance           qtvr,
  593.                                  UInt32                 enableFlag,
  594.                                  UInt32                 hotSpotValue,
  595.                                  Boolean                enable);
  596. EXTERN_API_C( UInt32 )
  597. QTVRGetVisibleHotSpots          (QTVRInstance           qtvr,
  598.                                  Handle                 hotSpots);
  599. EXTERN_API_C( OSErr )
  600. QTVRGetHotSpotRegion            (QTVRInstance           qtvr,
  601.                                  UInt32                 hotSpotID,
  602.                                  RgnHandle              hotSpotRegion);
  603. /*
  604.   =================================================================================================
  605.     Event & Cursor Handling Calls 
  606.   -------------------------------------------------------------------------------------------------
  607. */
  608. EXTERN_API_C( OSErr )
  609. QTVRSetMouseOverTracking        (QTVRInstance           qtvr,
  610.                                  Boolean                enable);
  611. EXTERN_API_C( Boolean )
  612. QTVRGetMouseOverTracking        (QTVRInstance           qtvr);
  613. EXTERN_API_C( OSErr )
  614. QTVRSetMouseDownTracking        (QTVRInstance           qtvr,
  615.                                  Boolean                enable);
  616. EXTERN_API_C( Boolean )
  617. QTVRGetMouseDownTracking        (QTVRInstance           qtvr);
  618. EXTERN_API_C( OSErr )
  619. QTVRMouseEnter                  (QTVRInstance           qtvr,
  620.                                  Point                  pt,
  621.                                  UInt32 *               hotSpotID,
  622.                                  WindowRef              w);
  623. EXTERN_API_C( OSErr )
  624. QTVRMouseWithin                 (QTVRInstance           qtvr,
  625.                                  Point                  pt,
  626.                                  UInt32 *               hotSpotID,
  627.                                  WindowRef              w);
  628. EXTERN_API_C( OSErr )
  629. QTVRMouseLeave                  (QTVRInstance           qtvr,
  630.                                  Point                  pt,
  631.                                  WindowRef              w);
  632. EXTERN_API_C( OSErr )
  633. QTVRMouseDown                   (QTVRInstance           qtvr,
  634.                                  Point                  pt,
  635.                                  UInt32                 when,
  636.                                  UInt16                 modifiers,
  637.                                  UInt32 *               hotSpotID,
  638.                                  WindowRef              w);
  639. EXTERN_API_C( OSErr )
  640. QTVRMouseStillDown              (QTVRInstance           qtvr,
  641.                                  Point                  pt,
  642.                                  UInt32 *               hotSpotID,
  643.                                  WindowRef              w);
  644. EXTERN_API_C( OSErr )
  645. QTVRMouseUp                     (QTVRInstance           qtvr,
  646.                                  Point                  pt,
  647.                                  UInt32 *               hotSpotID,
  648.                                  WindowRef              w);
  649. /* These require QTVR 2.01 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion01)*/
  650. EXTERN_API_C( OSErr )
  651. QTVRMouseStillDownExtended      (QTVRInstance           qtvr,
  652.                                  Point                  pt,
  653.                                  UInt32 *               hotSpotID,
  654.                                  WindowRef              w,
  655.                                  UInt32                 when,
  656.                                  UInt16                 modifiers);
  657. EXTERN_API_C( OSErr )
  658. QTVRMouseUpExtended             (QTVRInstance           qtvr,
  659.                                  Point                  pt,
  660.                                  UInt32 *               hotSpotID,
  661.                                  WindowRef              w,
  662.                                  UInt32                 when,
  663.                                  UInt16                 modifiers);
  664. /*
  665.   =================================================================================================
  666.     Intercept Routines 
  667.   -------------------------------------------------------------------------------------------------
  668. */
  669. EXTERN_API_C( OSErr )
  670. QTVRInstallInterceptProc        (QTVRInstance           qtvr,
  671.                                  QTVRProcSelector       selector,
  672.                                  QTVRInterceptUPP       interceptProc,
  673.                                  SInt32                 refCon,
  674.                                  UInt32                 flags);
  675. EXTERN_API_C( OSErr )
  676. QTVRCallInterceptedProc         (QTVRInstance           qtvr,
  677.                                  QTVRInterceptRecord *  qtvrMsg);
  678. /*
  679.   =================================================================================================
  680.     Object Movie Specific Calls 
  681.   -------------------------------------------------------------------------------------------------
  682.    QTVRGetCurrentMouseMode requires QTRVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)
  683. */
  684. EXTERN_API_C( UInt32 )
  685. QTVRGetCurrentMouseMode         (QTVRInstance           qtvr);
  686. EXTERN_API_C( OSErr )
  687. QTVRSetFrameRate                (QTVRInstance           qtvr,
  688.                                  float                  rate);
  689. EXTERN_API_C( float )
  690. QTVRGetFrameRate                (QTVRInstance           qtvr);
  691. EXTERN_API_C( OSErr )
  692. QTVRSetViewRate                 (QTVRInstance           qtvr,
  693.                                  float                  rate);
  694. EXTERN_API_C( float )
  695. QTVRGetViewRate                 (QTVRInstance           qtvr);
  696. EXTERN_API_C( OSErr )
  697. QTVRSetViewCurrentTime          (QTVRInstance           qtvr,
  698.                                  TimeValue              time);
  699. EXTERN_API_C( TimeValue )
  700. QTVRGetViewCurrentTime          (QTVRInstance           qtvr);
  701. EXTERN_API_C( TimeValue )
  702. QTVRGetCurrentViewDuration      (QTVRInstance           qtvr);
  703. /*
  704.   =================================================================================================
  705.    View State Calls - QTVR Object Only
  706.   -------------------------------------------------------------------------------------------------
  707. */
  708. EXTERN_API_C( OSErr )
  709. QTVRSetViewState                (QTVRInstance           qtvr,
  710.                                  QTVRViewStateType      viewStateType,
  711.                                  UInt16                 state);
  712. EXTERN_API_C( OSErr )
  713. QTVRGetViewState                (QTVRInstance           qtvr,
  714.                                  QTVRViewStateType      viewStateType,
  715.                                  UInt16 *               state);
  716. EXTERN_API_C( UInt16 )
  717. QTVRGetViewStateCount           (QTVRInstance           qtvr);
  718. EXTERN_API_C( OSErr )
  719. QTVRSetAnimationSetting         (QTVRInstance           qtvr,
  720.                                  QTVRObjectAnimationSetting  setting,
  721.                                  Boolean                enable);
  722. EXTERN_API_C( OSErr )
  723. QTVRGetAnimationSetting         (QTVRInstance           qtvr,
  724.                                  QTVRObjectAnimationSetting  setting,
  725.                                  Boolean *              enable);
  726. EXTERN_API_C( OSErr )
  727. QTVRSetControlSetting           (QTVRInstance           qtvr,
  728.                                  QTVRControlSetting     setting,
  729.                                  Boolean                enable);
  730. EXTERN_API_C( OSErr )
  731. QTVRGetControlSetting           (QTVRInstance           qtvr,
  732.                                  QTVRControlSetting     setting,
  733.                                  Boolean *              enable);
  734. EXTERN_API_C( OSErr )
  735. QTVREnableFrameAnimation        (QTVRInstance           qtvr,
  736.                                  Boolean                enable);
  737. EXTERN_API_C( Boolean )
  738. QTVRGetFrameAnimation           (QTVRInstance           qtvr);
  739. EXTERN_API_C( OSErr )
  740. QTVREnableViewAnimation         (QTVRInstance           qtvr,
  741.                                  Boolean                enable);
  742. EXTERN_API_C( Boolean )
  743. QTVRGetViewAnimation            (QTVRInstance           qtvr);
  744. /*
  745.   =================================================================================================
  746.     Imaging Characteristics 
  747.   -------------------------------------------------------------------------------------------------
  748. */
  749. EXTERN_API_C( OSErr )
  750. QTVRSetVisible                  (QTVRInstance           qtvr,
  751.                                  Boolean                visible);
  752. EXTERN_API_C( Boolean )
  753. QTVRGetVisible                  (QTVRInstance           qtvr);
  754. EXTERN_API_C( OSErr )
  755. QTVRSetImagingProperty          (QTVRInstance           qtvr,
  756.                                  QTVRImagingMode        imagingMode,
  757.                                  UInt32                 imagingProperty,
  758.                                  SInt32                 propertyValue);
  759. EXTERN_API_C( OSErr )
  760. QTVRGetImagingProperty          (QTVRInstance           qtvr,
  761.                                  QTVRImagingMode        imagingMode,
  762.                                  UInt32                 imagingProperty,
  763.                                  SInt32 *               propertyValue);
  764. EXTERN_API_C( OSErr )
  765. QTVRUpdate                      (QTVRInstance           qtvr,
  766.                                  QTVRImagingMode        imagingMode);
  767. EXTERN_API_C( OSErr )
  768. QTVRBeginUpdateStream           (QTVRInstance           qtvr,
  769.                                  QTVRImagingMode        imagingMode);
  770. EXTERN_API_C( OSErr )
  771. QTVREndUpdateStream             (QTVRInstance           qtvr);
  772. EXTERN_API_C( OSErr )
  773. QTVRSetTransitionProperty       (QTVRInstance           qtvr,
  774.                                  UInt32                 transitionType,
  775.                                  UInt32                 transitionProperty,
  776.                                  SInt32                 transitionValue);
  777. EXTERN_API_C( OSErr )
  778. QTVREnableTransition            (QTVRInstance           qtvr,
  779.                                  UInt32                 transitionType,
  780.                                  Boolean                enable);
  781. /*
  782.   =================================================================================================
  783.     Basic Conversion and Math Routines 
  784.   -------------------------------------------------------------------------------------------------
  785. */
  786. EXTERN_API_C( OSErr )
  787. QTVRSetAngularUnits             (QTVRInstance           qtvr,
  788.                                  QTVRAngularUnits       units);
  789. EXTERN_API_C( QTVRAngularUnits )
  790. QTVRGetAngularUnits             (QTVRInstance           qtvr);
  791. /* Pano specific routines*/
  792. EXTERN_API_C( OSErr )
  793. QTVRPtToAngles                  (QTVRInstance           qtvr,
  794.                                  Point                  pt,
  795.                                  float *                panAngle,
  796.                                  float *                tiltAngle);
  797. EXTERN_API_C( OSErr )
  798. QTVRCoordToAngles               (QTVRInstance           qtvr,
  799.                                  QTVRFloatPoint *       coord,
  800.                                  float *                panAngle,
  801.                                  float *                tiltAngle);
  802. EXTERN_API_C( OSErr )
  803. QTVRAnglesToCoord               (QTVRInstance           qtvr,
  804.                                  float                  panAngle,
  805.                                  float                  tiltAngle,
  806.                                  QTVRFloatPoint *       coord);
  807. /* Object specific routines*/
  808. EXTERN_API_C( short )
  809. QTVRPanToColumn                 (QTVRInstance           qtvr,
  810.                                  float                  panAngle);
  811. /* zero based   */
  812. EXTERN_API_C( float )
  813. QTVRColumnToPan                 (QTVRInstance           qtvr,
  814.                                  short                  column);
  815. /* zero based   */
  816. EXTERN_API_C( short )
  817. QTVRTiltToRow                   (QTVRInstance           qtvr,
  818.                                  float                  tiltAngle);
  819. /* zero based   */
  820. EXTERN_API_C( float )
  821. QTVRRowToTilt                   (QTVRInstance           qtvr,
  822.                                  short                  row);
  823. /* zero based               */
  824. EXTERN_API_C( OSErr )
  825. QTVRWrapAndConstrain            (QTVRInstance           qtvr,
  826.                                  short                  kind,
  827.                                  float                  value,
  828.                                  float *                result);
  829. /*
  830.   =================================================================================================
  831.     Interaction Routines 
  832.   -------------------------------------------------------------------------------------------------
  833. */
  834. EXTERN_API_C( OSErr )
  835. QTVRSetEnteringNodeProc         (QTVRInstance           qtvr,
  836.                                  QTVREnteringNodeUPP    enteringNodeProc,
  837.                                  SInt32                 refCon,
  838.                                  UInt32                 flags);
  839. EXTERN_API_C( OSErr )
  840. QTVRSetLeavingNodeProc          (QTVRInstance           qtvr,
  841.                                  QTVRLeavingNodeUPP     leavingNodeProc,
  842.                                  SInt32                 refCon,
  843.                                  UInt32                 flags);
  844. EXTERN_API_C( OSErr )
  845. QTVRSetInteractionProperty      (QTVRInstance           qtvr,
  846.                                  UInt32                 property,
  847.                                  void *                 value);
  848. EXTERN_API_C( OSErr )
  849. QTVRGetInteractionProperty      (QTVRInstance           qtvr,
  850.                                  UInt32                 property,
  851.                                  void *                 value);
  852. EXTERN_API_C( OSErr )
  853. QTVRReplaceCursor               (QTVRInstance           qtvr,
  854.                                  QTVRCursorRecord *     cursRecord);
  855. /*
  856.   =================================================================================================
  857.     Viewing Limits and Constraints 
  858.   -------------------------------------------------------------------------------------------------
  859. */
  860. EXTERN_API_C( OSErr )
  861. QTVRGetViewingLimits            (QTVRInstance           qtvr,
  862.                                  UInt16                 kind,
  863.                                  float *                minValue,
  864.                                  float *                maxValue);
  865. EXTERN_API_C( UInt32 )
  866. QTVRGetConstraintStatus         (QTVRInstance           qtvr);
  867. EXTERN_API_C( OSErr )
  868. QTVRGetConstraints              (QTVRInstance           qtvr,
  869.                                  UInt16                 kind,
  870.                                  float *                minValue,
  871.                                  float *                maxValue);
  872. EXTERN_API_C( OSErr )
  873. QTVRSetConstraints              (QTVRInstance           qtvr,
  874.                                  UInt16                 kind,
  875.                                  float                  minValue,
  876.                                  float                  maxValue);
  877. /*
  878.   =================================================================================================
  879.     Back Buffer Memory Management 
  880.   -------------------------------------------------------------------------------------------------
  881. */
  882. EXTERN_API_C( OSErr )
  883. QTVRGetAvailableResolutions     (QTVRInstance           qtvr,
  884.                                  UInt16 *               resolutionsMask);
  885. /* These require QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)*/
  886. EXTERN_API_C( OSErr )
  887. QTVRGetBackBufferMemInfo        (QTVRInstance           qtvr,
  888.                                  UInt32                 geometry,
  889.                                  UInt16                 resolution,
  890.                                  UInt32                 cachePixelFormat,
  891.                                  SInt32 *               minCacheBytes,
  892.                                  SInt32 *               suggestedCacheBytes,
  893.                                  SInt32 *               fullCacheBytes);
  894. EXTERN_API_C( OSErr )
  895. QTVRGetBackBufferSettings       (QTVRInstance           qtvr,
  896.                                  UInt32 *               geometry,
  897.                                  UInt16 *               resolution,
  898.                                  UInt32 *               cachePixelFormat,
  899.                                  SInt16 *               cacheSize);
  900. EXTERN_API_C( OSErr )
  901. QTVRSetBackBufferPrefs          (QTVRInstance           qtvr,
  902.                                  UInt32                 geometry,
  903.                                  UInt16                 resolution,
  904.                                  UInt32                 cachePixelFormat,
  905.                                  SInt16                 cacheSize);
  906. /*
  907.   =================================================================================================
  908.     Buffer Access 
  909.   -------------------------------------------------------------------------------------------------
  910. */
  911. EXTERN_API_C( OSErr )
  912. QTVRSetPrescreenImagingCompleteProc (QTVRInstance       qtvr,
  913.                                  QTVRImagingCompleteUPP  imagingCompleteProc,
  914.                                  SInt32                 refCon,
  915.                                  UInt32                 flags);
  916. EXTERN_API_C( OSErr )
  917. QTVRSetBackBufferImagingProc    (QTVRInstance           qtvr,
  918.                                  QTVRBackBufferImagingUPP  backBufferImagingProc,
  919.                                  UInt16                 numAreas,
  920.                                  QTVRAreaOfInterest     areasOfInterest[],
  921.                                  SInt32                 refCon);
  922. EXTERN_API_C( OSErr )
  923. QTVRRefreshBackBuffer           (QTVRInstance           qtvr,
  924.                                  UInt32                 flags);
  925. /*
  926.   =================================================================================================
  927.     Old Names
  928.   -------------------------------------------------------------------------------------------------
  929. */
  930. #if OLDROUTINENAMES
  931. typedef QTVRCursorRecord                CursorRecord;
  932. typedef QTVRAreaOfInterest              AreaOfInterest;
  933. typedef QTVRFloatPoint                  FloatPoint;
  934. typedef QTVRLeavingNodeProcPtr          LeavingNodeProcPtr;
  935. typedef QTVRLeavingNodeUPP              LeavingNodeUPP;
  936. typedef QTVREnteringNodeProcPtr         EnteringNodeProcPtr;
  937. typedef QTVREnteringNodeUPP             EnteringNodeUPP;
  938. typedef QTVRMouseOverHotSpotProcPtr     MouseOverHotSpotProcPtr;
  939. typedef QTVRMouseOverHotSpotUPP         MouseOverHotSpotUPP;
  940. typedef QTVRImagingCompleteProcPtr      ImagingCompleteProcPtr;
  941. typedef QTVRImagingCompleteUPP          ImagingCompleteUPP;
  942. typedef QTVRBackBufferImagingProcPtr    BackBufferImagingProcPtr;
  943. typedef QTVRBackBufferImagingUPP        BackBufferImagingUPP;
  944. #endif  /* OLDROUTINENAMES */
  945. #if PRAGMA_STRUCT_ALIGN
  946.     #pragma options align=reset
  947. #elif PRAGMA_STRUCT_PACKPUSH
  948.     #pragma pack(pop)
  949. #elif PRAGMA_STRUCT_PACK
  950.     #pragma pack()
  951. #endif
  952. #ifdef PRAGMA_IMPORT_OFF
  953. #pragma import off
  954. #elif PRAGMA_IMPORT
  955. #pragma import reset
  956. #endif
  957. #ifdef __cplusplus
  958. }
  959. #endif
  960. #endif /* __QUICKTIMEVR__ */