home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / source / povsrc.sit / MACHINE / MAC.SIT / StdCompression.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-24  |  2.6 KB  |  113 lines  |  [TEXT/KAHL]

  1.  
  2. /************************************************************
  3.  
  4.  StdCompression.h
  5.  
  6.  Copyright Apple Computer, Inc. 1991
  7.  All rights reserved
  8.  
  9. ************************************************************/
  10.  
  11.  
  12. #ifndef    __STDCOMPRESSION__
  13. #define    __STDCOMPRESSION__
  14.  
  15. #ifndef __IMAGECOMPRESSION__
  16. #include <ImageCompression.h>
  17. #endif
  18.  
  19.  
  20. typedef struct {
  21.     long            flags;
  22.     CodecType        theCodecType;
  23.     CodecComponent    theCodec;
  24.     CodecQ            spatialQuality;
  25.     CodecQ            temporalQuality;
  26.     short            depth;
  27.     Fixed            frameRate;
  28.     long            keyFrameRate;
  29.     long            reserved1;
  30.     long            reserved2;
  31. } SCParams;
  32.  
  33.  
  34. typedef pascal Boolean (*SCModalFilterProcPtr)(DialogPtr theDialog,
  35.     EventRecord *theEvent, short *itemHit, long refcon);
  36.  
  37. typedef pascal short (*SCModalHookProcPtr)(DialogPtr theDialog,
  38.     short itemHit, SCParams *params, long refcon);
  39.  
  40.  
  41. /*
  42.  *    Flags for SCParams.
  43.  */
  44. #define    scShowMotionSettings    (1L<<0)
  45. #define    scListEveryCodec        (1L<<1)
  46. #define    scAllowZeroFrameRate    (1L<<2)
  47. #define    scAllowZeroKeyFrameRate    (1L<<3)
  48.  
  49.  
  50. /*
  51.  *    Possible test flags for setting test image.
  52.  */
  53. #define    scPreferCropping            (1<<0)
  54. #define    scPreferScaling                (1<<1)
  55. #define scPreferScalingAndCropping    (scPreferScaling + scPreferCropping)
  56.  
  57.  
  58. /*
  59.  *    Dimensions of the image preview box.
  60.  */
  61. #define    scTestImageWidth    80
  62. #define    scTestImageHeight    80
  63.  
  64.  
  65. /*
  66.  *    Possible items returned by hookProc.
  67.  */
  68. #define    scSettingsChangedItem    -1
  69. #define    scOKItem                1
  70. #define    scCancelItem            2
  71. #define    scCustomItem            3
  72.  
  73.  
  74. pascal ComponentInstance
  75. OpenStdCompression(void);
  76.  
  77. pascal ComponentResult
  78. SCGetCompressionExtended(ComponentInstance ci,SCParams *params,Point where,
  79.     SCModalFilterProcPtr filterProc,SCModalHookProcPtr hookProc,long refcon,StringPtr customName)
  80.     = {0x2F3C,24,1,0x7000,0xA82A};
  81.  
  82. pascal ComponentResult
  83. SCGetCompression(ComponentInstance ci,SCParams *params,Point where)
  84.     = {0x42A7,0x42A7,0x42A7,0x42A7,0x2F3C,24,1,0x7000,0xA82A};
  85.  
  86. pascal ComponentResult
  87. SCPositionRect(ComponentInstance ci,Rect *rp,Point *where)
  88.     = {0x2F3C,8,2,0x7000,0xA82A};
  89.  
  90. pascal ComponentResult
  91. SCPositionDialog(ComponentInstance ci,short id,Point *where)
  92.     = {0x2F3C,6,3,0x7000,0xA82A};
  93.  
  94. pascal ComponentResult
  95. SCSetTestImagePictHandle(ComponentInstance ci, PicHandle testPict, Rect *testRect, short testFlags)
  96.     = {0x2F3C,10,4,0x7000,0xA82A};
  97.  
  98. pascal ComponentResult
  99. SCSetTestImagePictFile(ComponentInstance ci, short testFileRef, Rect *testRect, short testFlags)
  100.     = {0x2F3C,8,5,0x7000,0xA82A};
  101.  
  102. pascal ComponentResult
  103. SCSetTestImagePixMap(ComponentInstance ci, PixMapHandle testPixMap, Rect *testRect, short testFlags)
  104.     = {0x2F3C,10,6,0x7000,0xA82A};
  105.  
  106. pascal ComponentResult
  107. SCGetBestDeviceRect(ComponentInstance ci, Rect *r) 
  108.      = {0x2F3C,4,7,0x7000,0xA82A};
  109.     
  110.  
  111. #endif __STDCOMPRESSION__
  112.  
  113.