home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / source / divaplug.cpt / VideoShop Plug-In Kit 1.0 / DiVATransition.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-05-06  |  4.8 KB  |  126 lines

  1. /*
  2.  
  3.     DiVATransition.h
  4.     
  5.     Interface definitons and specifications for DiVA VideoShop transition
  6.     effect code modules.
  7.     
  8.     09/16/91    Ivçn Cavero Bela£nde
  9.     
  10.     ⌐ 1991, 1992 DiVA Corporation. All rights reserved.
  11.     
  12. */
  13.  
  14. #ifndef DIVAXSITION
  15. #define DIVAXSITION
  16.  
  17. #include <Types.h>
  18. #include <QuickDraw.h>
  19. #include <QDOffscreen.h>
  20.  
  21. /*    Selector Constants    */
  22.  
  23. #define XSParameters    0
  24.     /*    Initialize and display paramters dialog            */
  25. #define XSPrepare        1
  26.     /*    Prepare for applying transition                    */
  27. #define    XSStart            2
  28.     /*    Initialize transition-wide globals and buffers    */
  29. #define XSProcessFrame    3
  30.     /*    Apply transition to frame                        */
  31. #define XSFinish        4
  32.     /*    Deallocate globals                                */
  33.  
  34.  
  35. #define    kXsnVersion        1
  36.     /*    Transition interface version        */
  37. #define    kXsnCodeType    'Vxsn'
  38.     /*    Type of transition code resource    */
  39. #define kXsnInfoType    'XsnI'
  40.     /*    Type of transition info resource    */
  41.  
  42.  
  43.  
  44. /*    Error Codes    */
  45.  
  46. enum {
  47.     XSErrReported                =    0x00010000,    /*    An error has occurred. Do not display dialog.        */
  48.     XSErrOutOfDiskSpace            =    0x00030000,    /*    "The effect could not be applied because there
  49.                                                     is not enough disk space in the recording bin."        */
  50.     XSErrOutOfMemory            =    0x00040000,    /*    "The effect could not be applied because there
  51.                                                     is not enough memory available."                    */
  52.     XSErrEffectFileCorrupted    =    0x00050000,    /*    "The effect module is corrupted. Please replace
  53.                                                     it with the original effects module."                */
  54.     XSErrBadSystemVersion        =    0x00060000,    /*    "This effect module will not function with the
  55.                                                     currently installed system software."                */
  56.     XSErrBadQDVersion            =    0x00080000,    /*    "This effect module will not work with the currently
  57.                                                     installed version of 32-bit QuickDraw."                */
  58.     XSErrBadQTVersion            =    0x000A0000,    /*    "This effect module will not work with the currently
  59.                                                     installed version of QuickTime."                    */
  60.     XSErrBadVSVersion            =    0x000C0000,    /*    "This effect module will not work with this version
  61.                                                     of DiVA VideoShop¬."                                */
  62. };
  63.  
  64.  
  65.  
  66. /*    Types    */
  67.  
  68. /*    Parameter Block    */
  69. typedef struct XsitionRecord {
  70.     long        version;        /*    Version of Transition Interface used by called. This version
  71.                                     is version 1.                                                    */
  72.     ProcPtr     abortProc;        /*    Pointer to no-argument BOOLEAN pascal function that returns
  73.                                     whether the user has canceled the transition operation.            */
  74.     ProcPtr     progressProc;    /*    Pointer to two-argument pascal procedure that accepts two
  75.                                     LONGINTs. The first one describes how much of the transition
  76.                                     operation for this frame has been completed. The second one
  77.                                     describes the number of operations for this frame.                */
  78.     Handle        parameters;        /*    Plug-in's storage handle, initialized to NIL by VideoShop
  79.                                     unless passing same parameters handle as an earlier transition
  80.                                     operation. Must be self-contained, and must not be disposed
  81.                                     of by the transition.                                            */
  82.     long        timeScale;        /*    The time unit of other time measurements, such as frame and
  83.                                     timeStep, in ticks per second.                                    */
  84.     long        timeStep;        /*    The amount of ticks stepped forward in the sequence between
  85.                                     successive calls.                                                */
  86.     RGBColor    background;        /*    The background color. If the transition operation leaves any
  87.                                     part of the image "empty," it should be filled with this color.    */
  88.     PixMapHandle    srcA;        /*    The original source images to be mixed, standard QuickDraw        */
  89.     PixMapHandle    srcB;        /*    PixMapHandles,    not-purgeable, and unlocked.                    */
  90.     
  91.     GWorldPtr        destImage;    /*    The destination image buffer for the transitioned image.        */
  92. } XsitionParams, *XsitionParamPtr;
  93.  
  94.  
  95. /*    Transition Info Record    */
  96.  
  97. typedef struct XsnInfoRec {
  98.     long    version;            /*    Version number of VideoShop's calling interface this transition
  99.                                     is compatible with.                                                    */
  100.     OSType    media;                /*    Media this transition operates on. Currently only transitions
  101.                                     that operate on video media ('vide') are supported.                    */
  102.     long    flags;                /*    Transition flags. Currently only filterFlagTimeBased is defined.    */
  103.     OSType    xsnSignature;        /*    Transition signature. A unique 4-character ID for this transition.
  104.                                     Analogous to a QuickTime component componentSubType.                */
  105.     long    xsnVersion;            /*    Transition version.                                                    */
  106.     OSType    xsnManufacturer;    /*    Transition manufacturer. A 4-character ID for the manufacturer of
  107.                                     this transition, analogous to a QuickTime component
  108.                                     componentManufacturer.                                                */
  109.     OSType    descRsrcType;        /*    Resource type and ID of description of transition. Description
  110.                                     should be a pascal string.                                            */
  111.     short    descRsrcID;
  112. /*    Reserved for future expansion    */
  113. }    **XsitionInfo;
  114.  
  115.  
  116. typedef long XsnErr;
  117.  
  118.  
  119. typedef pascal XsnErr (*DiVAXsitionPtr)(short selector, XsitionParamPtr transitionRecord,
  120.     long *data, short transitionIntensity, short maxTransitionIntensity);
  121.  
  122.  
  123.  
  124.  
  125. #endif DIVAXSITION
  126.