📄 components.h
字号:
short txFont; StyleField txFace; /*StyleField occupies 16-bits, but only first 8-bits are used*/ UInt8 txFlags; /* QuickTime uses second 8 bits of StyleField for txFlags */ short txMode; short txSize; Fixed spExtra; int32_t fgColor; int32_t bkColor; short colrBit; short patStretch; Handle picSave; Handle rgnSave; Handle polySave; /*QDProcsPtr*/void* grafProcs;};typedef struct GrafPort GrafPort;typedef GrafPort *GWorldPtr;typedef GWorldPtr *GWorldHandle;#define anyCodec ((CodecComponent)0)enum { /* transfer modes */ srcCopy = 0, /*the 16 transfer modes*/ srcOr = 1, srcXor = 2, srcBic = 3, notSrcCopy = 4, notSrcOr = 5, notSrcXor = 6, notSrcBic = 7, patCopy = 8, patOr = 9, patXor = 10, patBic = 11, notPatCopy = 12, notPatOr = 13, notPatXor = 14, notPatBic = 15, /* Special Text Transfer Mode */ grayishTextOr = 49, hilitetransfermode = 50, hilite = 50, /* Arithmetic transfer modes */ blend = 32, addPin = 33, addOver = 34, subPin = 35, addMax = 37, adMax = 37, subOver = 38, adMin = 39, ditherCopy = 64, /* Transparent mode constant */ transparent = 36};typedef uint32_t GWorldFlags;// ============================== CODECS ===========================typedef Component CompressorComponent;typedef Component DecompressorComponent;typedef Component CodecComponent;enum { codecLosslessQuality = 0x00000400, codecMaxQuality = 0x000003FF, codecMinQuality = 0x00000000, codecLowQuality = 0x00000100, codecNormalQuality = 0x00000200, codecHighQuality = 0x00000300};// callbacks:typedef void* ImageCodecDrawBandCompleteUPP;typedef int64_t ICMProgressProcRecord;typedef int64_t ICMCompletionProcRecord;typedef ICMCompletionProcRecord* ICMCompletionProcRecordPtr;typedef int64_t ICMDataProcRecord;typedef void* ICMFrameTimePtr;typedef void* CDSequenceDataSourcePtr;typedef void* ICMFrameTimeInfoPtr;// graphics porttypedef struct OpaqueGrafPtr* GrafPtr;typedef GrafPtr CGrafPtr;/* codec capabilities flags */enum { codecCanScale = 1L << 0, // 1 codecCanMask = 1L << 1, // 2 codecCanMatte = 1L << 2, // 4 codecCanTransform = 1L << 3, // 8 codecCanTransferMode = 1L << 4, // 10 codecCanCopyPrev = 1L << 5, // 20 codecCanSpool = 1L << 6, // 40 codecCanClipVertical = 1L << 7, // 80 codecCanClipRectangular = 1L << 8, // 100 codecCanRemapColor = 1L << 9, // 200 codecCanFastDither = 1L << 10, // 400 codecCanSrcExtract = 1L << 11, // 800 codecCanCopyPrevComp = 1L << 12, // 1000 codecCanAsync = 1L << 13, // 2000 codecCanMakeMask = 1L << 14, // 4000 codecCanShift = 1L << 15, // 8000 codecCanAsyncWhen = 1L << 16, // 10000 codecCanShieldCursor = 1L << 17, // 20000 codecCanManagePrevBuffer = 1L << 18, // 40000 codecHasVolatileBuffer = 1L << 19, // 80000 /* codec requires redraw after window movement */ codecWantsRegionMask = 1L << 20, // 100000 codecImageBufferIsOnScreen = 1L << 21, // 200000 /* old def of codec using overlay surface, = ( codecIsDirectToScreenOnly | codecUsesOverlaySurface | codecImageBufferIsOverlaySurface | codecSrcMustBeImageBuffer ) */ codecWantsDestinationPixels = 1L << 22, // 400000 codecWantsSpecialScaling = 1L << 23, // 800000 codecHandlesInputs = 1L << 24, // 1000000 codecCanDoIndirectSurface = 1L << 25, /* codec can handle indirect surface (GDI) */ codecIsSequenceSensitive = 1L << 26, codecRequiresOffscreen = 1L << 27, codecRequiresMaskBits = 1L << 28, codecCanRemapResolution = 1L << 29, codecIsDirectToScreenOnly = 1L << 30, /* codec can only decompress data to the screen */ codecCanLockSurface = 1L << 31 /* codec can lock destination surface, icm doesn't lock for you */};/* codec capabilities flags2 */enum { codecUsesOverlaySurface = 1L << 0, /* codec uses overlay surface */ codecImageBufferIsOverlaySurface = 1L << 1, /* codec image buffer is overlay surface, the bits in the buffer are on the screen */ codecSrcMustBeImageBuffer = 1L << 2, /* codec can only source data from an image buffer */ codecImageBufferIsInAGPMemory = 1L << 4, /* codec image buffer is in AGP space, byte writes are OK */ codecImageBufferIsInPCIMemory = 1L << 5 /* codec image buffer is across a PCI bus; byte writes are bad */};/* codec condition flags */// FFD = 13 = 8+4+1enum { codecConditionFirstBand = 1L << 0, // 1 codecConditionLastBand = 1L << 1, // 2 codecConditionFirstFrame = 1L << 2, // 4 codecConditionNewDepth = 1L << 3, // 8 codecConditionNewTransform = 1L << 4, // 10 codecConditionNewSrcRect = 1L << 5, // 20 codecConditionNewMask = 1L << 6, // 40 codecConditionNewMatte = 1L << 7, // 80 codecConditionNewTransferMode = 1L << 8, // 100 codecConditionNewClut = 1L << 9, // 200 codecConditionNewAccuracy = 1L << 10, // 400 codecConditionNewDestination = 1L << 11, // 800 codecConditionFirstScreen = 1L << 12, // 1000 codecConditionDoCursor = 1L << 13, // 2000 codecConditionCatchUpDiff = 1L << 14, // 4000 codecConditionMaskMayBeChanged = 1L << 15, // 8000 codecConditionToBuffer = 1L << 16, // 10000 codecConditionCodecChangedMask = 1L << 31 // 20000};struct __attribute__((__packed__)) CodecCapabilities { int32_t flags; short wantedPixelSize; short extendWidth; short extendHeight; short bandMin; short bandInc; short pad; uint32_t time; int32_t flags2; /* field new in QuickTime 4.0 */};typedef struct CodecCapabilities CodecCapabilities;struct __attribute__((__packed__)) CodecDecompressParams { ImageSequence sequenceID; /* predecompress,banddecompress */ ImageDescriptionHandle imageDescription; /* predecompress,banddecompress */ Ptr data; int32_t bufferSize; int32_t frameNumber; int32_t startLine; int32_t stopLine; int32_t conditionFlags; CodecFlags callerFlags; // short CodecCapabilities * capabilities; /* predecompress,banddecompress */ ICMProgressProcRecord progressProcRecord; ICMCompletionProcRecord completionProcRecord; ICMDataProcRecord dataProcRecord; CGrafPtr port; /* predecompress,banddecompress */ PixMap dstPixMap; /* predecompress,banddecompress */ BitMapPtr maskBits; PixMapPtr mattePixMap; Rect srcRect; /* predecompress,banddecompress */ MatrixRecord * matrix; /* predecompress,banddecompress */ CodecQ accuracy; /* predecompress,banddecompress */ short transferMode; /* predecompress,banddecompress */ ICMFrameTimePtr frameTime; /* banddecompress */ int32_t reserved[1]; /* The following fields only exist for QuickTime 2.0 and greater */ SInt8 matrixFlags; /* high bit set if 2x resize */ SInt8 matrixType; Rect dstRect; /* only valid for simple transforms */ /* The following fields only exist for QuickTime 2.1 and greater */ UInt16 majorSourceChangeSeed; UInt16 minorSourceChangeSeed; CDSequenceDataSourcePtr sourceData; RgnHandle maskRegion; /* The following fields only exist for QuickTime 2.5 and greater */ OSType ** wantedDestinationPixelTypes; /* Handle to 0-terminated list of OSTypes */ int32_t screenFloodMethod; int32_t screenFloodValue; short preferredOffscreenPixelSize; /* The following fields only exist for QuickTime 3.0 and greater */ ICMFrameTimeInfoPtr syncFrameTime; /* banddecompress */ Boolean needUpdateOnTimeChange; /* banddecompress */ Boolean enableBlackLining; Boolean needUpdateOnSourceChange; /* band decompress */ Boolean pad; int32_t unused; CGrafPtr finalDestinationPort; int32_t requestedBufferWidth; /* must set codecWantsSpecialScaling to indicate this field is valid*/ int32_t requestedBufferHeight; /* must set codecWantsSpecialScaling to indicate this field is valid*/ /* The following fields only exist for QuickTime 4.0 and greater */ Rect displayableAreaOfRequestedBuffer; /* set in predecompress*/ Boolean requestedSingleField; Boolean needUpdateOnNextIdle; Boolean pad2[2]; Fixed bufferGammaLevel; /* The following fields only exist for QuickTime 5.0 and greater */ UInt32 taskWeight; /* preferred weight for MP tasks implementing this operation*/ OSType taskName; /* preferred name (type) for MP tasks implementing this operation*/};typedef struct CodecDecompressParams CodecDecompressParams;struct __attribute__((__packed__)) ImageSubCodecDecompressCapabilities {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -