Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
CUtils.h
/* |
Random and sundry error, file and path name utilities |
Created 29 Jan 1996 by EGH |
Copyright © 1996, Apple Computer, Inc. All rights reserved. |
*/ |
#pragma once |
#include <ImageCompression.h> |
#include <LWindow.h> |
void GetFullPathName( |
const FSSpec *fileSpec, |
Str255 outPathName, |
short maxSize = 255); |
OSErr FSpGetFullPath( |
const FSSpec *spec, |
short *fullPathLength, |
Handle *fullPath); |
void ElipsedPathName( |
Str255 pathName, |
short maxWidth, |
Str255 elipsedName, |
char elipsis); |
void ElipsedPathNameH( |
Handle pathNameH, |
short maxWidth, |
Str255 elipsedName, |
char elipsis); |
void SetSizedDescriptor( |
LWindow *parent, |
PaneIDT inPaneID, |
StringPtr inDescStr); |
void ReportError( |
ExceptionCode inErr, |
Int16 inStrIndex); |
OSErr GetFileParent( |
FSSpec *fileSpec, |
FSSpec *parentSpec); |
void ReadPictFrame( |
const FSSpec &inPictSpec, |
Rect &outPictRect); |
void FixedToStr( |
Fixed inFixValue, |
Str255 outStr); |
Fixed StrToFixed( |
StringPtr str); |
Boolean FindCodecName( |
StringPtr outName, |
CodecType inCodec); |
void SetCompressionText( |
LPane *inPane, |
CodecType inCodec, |
CodecQ inSpatialQuality); |
enum |
{ |
err_Window = 1, |
err_OpenPicture = 2, |
err_CreateTileMovie = 3, |
err_CreatePanoMovie = 4, |
err_BadPictHeight = 5, |
err_ErrorSettingCompression = 6, |
STRx_Errors = 222 |
}; |
enum |
{ |
err_NotEnufMemory = 1, |
err_DiskError = 2, |
err_DiskFull = 3, |
err_NoDescription = 4, |
err_NoResource = 5, |
err_NotEnufPhysicalMemory = 6, |
STRx_ErrorDescs = 224 |
}; |
const ResIDT ALRT_Error = 129; |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14