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

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       VideoServices.h
  3.  
  4.      Contains:   Video Services Library Interfaces.
  5.  
  6.      Version:    Technology: PowerSurge 1.0.2
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1994-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 __VIDEOSERVICES__
  18. #define __VIDEOSERVICES__
  19. #ifndef __MACTYPES__
  20. #include "MacTypes.h"
  21. #endif
  22. #ifndef __NAMEREGISTRY__
  23. #include "NameRegistry.h"
  24. #endif
  25. #ifndef __QUICKDRAW__
  26. #include "Quickdraw.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. enum {
  45.     kTransparentEncoding        = 0,
  46.     kInvertingEncoding          = 1
  47. };
  48. enum {
  49.     kTransparentEncodingShift   = (kTransparentEncoding << 1),
  50.     kTransparentEncodedPixel    = (0x01 << kTransparentEncodingShift),
  51.     kInvertingEncodingShift     = (kInvertingEncoding << 1),
  52.     kInvertingEncodedPixel      = (0x01 << kInvertingEncodingShift)
  53. };
  54. enum {
  55.     kHardwareCursorDescriptorMajorVersion = 0x0001,
  56.     kHardwareCursorDescriptorMinorVersion = 0x0000
  57. };
  58. typedef UInt32 *                        UInt32Ptr;
  59. struct HardwareCursorDescriptorRec {
  60.     UInt16                          majorVersion;
  61.     UInt16                          minorVersion;
  62.     UInt32                          height;
  63.     UInt32                          width;
  64.     UInt32                          bitDepth;
  65.     UInt32                          maskBitDepth;
  66.     UInt32                          numColors;
  67.     UInt32Ptr                       colorEncodings;
  68.     UInt32                          flags;
  69.     UInt32                          supportedSpecialEncodings;
  70.     UInt32                          specialEncodings[16];
  71. };
  72. typedef struct HardwareCursorDescriptorRec HardwareCursorDescriptorRec;
  73. typedef HardwareCursorDescriptorRec *   HardwareCursorDescriptorPtr;
  74. enum {
  75.     kHardwareCursorInfoMajorVersion = 0x0001,
  76.     kHardwareCursorInfoMinorVersion = 0x0000
  77. };
  78. struct HardwareCursorInfoRec {
  79.     UInt16                          majorVersion;               /* Test tool should check for kHardwareCursorInfoMajorVersion1*/
  80.     UInt16                          minorVersion;               /* Test tool should check for kHardwareCursorInfoMinorVersion1*/
  81.     UInt32                          cursorHeight;
  82.     UInt32                          cursorWidth;
  83.     CTabPtr                         colorMap;                   /* nil or big enough for hardware's max colors*/
  84.     Ptr                             hardwareCursor;
  85.     UInt32                          reserved[6];                /* Test tool should check for 0s*/
  86. };
  87. typedef struct HardwareCursorInfoRec    HardwareCursorInfoRec;
  88. typedef HardwareCursorInfoRec *         HardwareCursorInfoPtr;
  89. enum {
  90.     kVBLInterruptServiceType    = FOUR_CHAR_CODE('vbl '),
  91.     kHBLInterruptServiceType    = FOUR_CHAR_CODE('hbl '),
  92.     kFrameInterruptServiceType  = FOUR_CHAR_CODE('fram'),
  93.     kConnectInterruptServiceType = FOUR_CHAR_CODE('dci '),      /* Renamed -- Use kFBCheckInterruptServiceType*/
  94.     kFBConnectInterruptServiceType = kConnectInterruptServiceType, /* Demand to check configuration (Hardware unchanged)*/
  95.     kFBChangedInterruptServiceType = FOUR_CHAR_CODE('chng'),    /* Demand to rebuild (Hardware has reinitialized on dependent change)*/
  96.     kFBOfflineInterruptServiceType = FOUR_CHAR_CODE('remv'),    /* Demand to remove framebuffer (Hardware not available on dependent change -- but must not buserror)*/
  97.     kFBOnlineInterruptServiceType = FOUR_CHAR_CODE('add ')      /* Notice that hardware is available (after being removed)*/
  98. };
  99. enum {
  100.     kMaxDisplayConfigDataSize   = 64                            /* Max data size for VSLSetDisplayConfiguration*/
  101. };
  102. typedef ResType                         InterruptServiceType;
  103. typedef UInt32                          InterruptServiceIDType;
  104. typedef InterruptServiceIDType *        InterruptServiceIDPtr;
  105. #if CALL_NOT_IN_CARBON
  106. EXTERN_API_C( OSErr )
  107. VSLNewInterruptService          (RegEntryID *           serviceDevice,
  108.                                  InterruptServiceType   serviceType,
  109.                                  InterruptServiceIDPtr  serviceID);
  110. EXTERN_API_C( OSErr )
  111. VSLWaitOnInterruptService       (InterruptServiceIDType  serviceID,
  112.                                  Duration               timeout);
  113. EXTERN_API_C( OSErr )
  114. VSLDisposeInterruptService      (InterruptServiceIDType  serviceID);
  115. EXTERN_API_C( OSErr )
  116. VSLDoInterruptService           (InterruptServiceIDType  serviceID);
  117. EXTERN_API_C( Boolean )
  118. VSLPrepareCursorForHardwareCursor (void *               cursorRef,
  119.                                  HardwareCursorDescriptorPtr  hardwareDescriptor,
  120.                                  HardwareCursorInfoPtr  hwCursorInfo);
  121. EXTERN_API_C( OSErr )
  122. VSLSetDisplayConfiguration      (RegEntryID *           device,
  123.                                  RegPropertyName *      propertyName,
  124.                                  void *                 configData,
  125.                                  long                   configDataSize);
  126. #endif  /* CALL_NOT_IN_CARBON */
  127. #if PRAGMA_STRUCT_ALIGN
  128.     #pragma options align=reset
  129. #elif PRAGMA_STRUCT_PACKPUSH
  130.     #pragma pack(pop)
  131. #elif PRAGMA_STRUCT_PACK
  132.     #pragma pack()
  133. #endif
  134. #ifdef PRAGMA_IMPORT_OFF
  135. #pragma import off
  136. #elif PRAGMA_IMPORT
  137. #pragma import reset
  138. #endif
  139. #ifdef __cplusplus
  140. }
  141. #endif
  142. #endif /* __VIDEOSERVICES__ */