home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HyperLib 1997 Winter - Disc 1
/
HYPERLIB-1997-Winter-CD1.ISO.7z
/
HYPERLIB-1997-Winter-CD1.ISO
/
第1特集Plug-in
/
Photoshop
/
Plug-in_Kit_2.5.1.sit
/
Plug-in_Kit_2.5.1
/
Code
/
#temp.h.out#
next >
Wrap
Text File
|
1994-03-23
|
11KB
|
379 lines
/*
File: temp.h.c
Copyright: ゥ 1984-1993 by Apple Computer, Inc., all rights reserved.
WARNING
TestAbortProcProcUPP,
kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(Boolean))));
ProgressProcProcUPP,
kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(done)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(total))),
HostProcProcUPP,
kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(selector)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(data))),
#error "Result types larger than 4 bytes are not supported."
#endif
#endif
long private_result;
static UniversalProcPtr* private_trapVector = nil;
if (!private_trapVector) private_trapVector = GetTrapVector(0x0000);
private_result = CallUniversalProc(SpaceProcProcUPP,
kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(int32))));
return *(((int32*)&private_result) + RESULT_OFFSET(int32));
}
UniversalProcPtr NewPIHandleProcProcUPP;
pascal Handle NewPIHandleProcProc(int32 size)
{
#ifdef applec
#if sizeof(Handle) > 4
#error "Result types larger than 4 bytes are not supported."
#endif
#endif
long private_result;
static UniversalProcPtr* private_trapVector = nil;
if (!private_trapVector) private_trapVector = GetTrapVector(0x0000);
private_result = CallUniversalProc(NewPIHandleProcProcUPP,
kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(Handle)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(size))),
size);
return *(((Handle*)&private_result) + RESULT_OFFSET(Handle));
}
UniversalProcPtr DisposePIHandleProcProcUPP;
pascal void DisposePIHandleProcProc(Handle h)
{
static UniversalProcPtr* private_trapVector = nil;
if (!private_trapVector) private_trapVector = GetTrapVector(0x0000);
(void)CallUniversalProc(DisposePIHandleProcProcUPP,
kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(h))),
h);
}
UniversalProcPtr GetPIHandleSizeProcProcUPP;
pascal int32 GetPIHandleSizeProcProc(Handle h)
{
#ifdef applec
#if sizeof(int32) > 4
#error "Result types larger than 4 bytes are not supported."
#endif
#endif
long private_result;
static UniversalProcPtr* private_trapVector = nil;
if (!private_trapVector) private_trapVector = GetTrapVector(0x0000);
private_result = CallUniversalProc(GetPIHandleSizeProcProcUPP,
kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(int32)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(h))),
h);
return *(((int32*)&private_result) + RESULT_OFFSET(int32));
}
UniversalProcPtr SetPIHandleSizeProcProcUPP;
pascal OSErr SetPIHandleSizeProcProc(Handle h, int32 newSize)
{
#ifdef applec
#if sizeof(OSErr) > 4
#error "Result types larger than 4 bytes are not supported."
#endif
#endif
long private_result;
static UniversalProcPtr* private_trapVector = nil;
if (!private_trapVector) private_trapVector = GetTrapVector(0x0000);
private_result = CallUniversalProc(SetPIHandleSizeProcProcUPP,
kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(h)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(newSize))),
h,
newSize);
return *(((OSErr*)&private_result) + RESULT_OFFSET(OSErr));
}
UniversalProcPtr LockPIHandleProcProcUPP;
pascal Ptr LockPIHandleProcProc(Handle h, Boolean moveHigh)
{
#ifdef applec
#if sizeof(Ptr) > 4
#error "Result types larger than 4 bytes are not supported."
#endif
#endif
long private_result;
static UniversalProcPtr* private_trapVector = nil;
if (!private_trapVector) private_trapVector = GetTrapVector(0x0000);
private_result = CallUniversalProc(LockPIHandleProcProcUPP,
kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(Ptr)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(h)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(moveHigh))),
h,
moveHigh);
return *(((Ptr*)&private_result) + RESULT_OFFSET(Ptr));
}
UniversalProcPtr UnlockPIHandleProcProcUPP;
pascal void UnlockPIHandleProcProc(Handle h)
{
static UniversalProcPtr* private_trapVector = nil;
if (!private_trapVector) private_trapVector = GetTrapVector(0x0000);
(void)CallUniversalProc(UnlockPIHandleProcProcUPP,
kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(h))),
h);
}
UniversalProcPtr AllocateBufferProcProcUPP;
pascal OSErr AllocateBufferProcProc(int32 size, BufferID *bufferID)
{
#ifdef applec
#if sizeof(OSErr) > 4
#error "Result types larger than 4 bytes are not supported."
#endif
#endif
long private_result;
static UniversalProcPtr* private_trapVector = nil;
if (!private_trapVector) private_trapVector = GetTrapVector(0x0000);
private_result = CallUniversalProc(AllocateBufferProcProcUPP,
kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(size)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(bufferID))),
size,
bufferID);
return *(((OSErr*)&private_result) + RESULT_OFFSET(OSErr));
}
UniversalProcPtr LockBufferProcProcUPP;
pascal Ptr LockBufferProcProc(BufferID bufferID, Boolean moveHigh)
{
#ifdef applec
#if sizeof(Ptr) > 4
#error "Result types larger than 4 bytes are not supported."
#endif
#endif
long private_result;
static UniversalProcPtr* private_trapVector = nil;
if (!private_trapVector) private_trapVector = GetTrapVector(0x0000);
private_result = CallUniversalProc(LockBufferProcProcUPP,
kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(Ptr)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(bufferID)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(moveHigh))),
bufferID,
moveHigh);
return *(((Ptr*)&private_result) + RESULT_OFFSET(Ptr));
}
UniversalProcPtr UnlockBufferProcProcUPP;
pascal void UnlockBufferProcProc(BufferID bufferID)
{
static UniversalProcPtr* private_trapVector = nil;
if (!private_trapVector) private_trapVector = GetTrapVector(0x0000);
(void)CallUniversalProc(UnlockBufferProcProcUPP,
kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(bufferID))),
bufferID);
}
UniversalProcPtr FreeBufferProcProcUPP;
pascal void FreeBufferProcProc(BufferID bufferID)
{
static UniversalProcPtr* private_trapVector = nil;
if (!private_trapVector) private_trapVector = GetTrapVector(0x0000);
(void)CallUniversalProc(FreeBufferProcProcUPP,
kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(bufferID))),
bufferID);
}
UniversalProcPtr BufferSpaceProcProcUPP;
pascal int32 BufferSpaceProcProc(void)
{
#ifdef applec
#if sizeof(int32) > 4
#error "Result types larger than 4 bytes are not supported."
#endif
#endif
long private_result;
static UniversalProcPtr* private_trapVector = nil;
if (!private_trapVector) private_trapVector = GetTrapVector(0x0000);
private_result = CallUniversalProc(BufferSpaceProcProcUPP,
kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(int32))));
return *(((int32*)&private_result) + RESULT_OFFSET(int32));
}
UniversalProcPtr CountPIResourcesProcProcUPP;
pascal int16 CountPIResourcesProcProc(ResType type)
{
#ifdef applec
#if sizeof(int16) > 4
#error "Result types larger than 4 bytes are not supported."
#endif
#endif
long private_result;
static UniversalProcPtr* private_trapVector = nil;
if (!private_trapVector) private_trapVector = GetTrapVector(0x0000);
private_result = CallUniversalProc(CountPIResourcesProcProcUPP,
kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(int16)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(type))),
type);
return *(((int16*)&private_result) + RESULT_OFFSET(int16));
}
UniversalProcPtr GetPIResourceProcProcUPP;
pascal Handle GetPIResourceProcProc(ResType type, int16 index)
{
#ifdef applec
#if sizeof(Handle) > 4
#error "Result types larger than 4 bytes are not supported."
#endif
#endif
long private_result;
static UniversalProcPtr* private_trapVector = nil;
if (!private_trapVector) private_trapVector = GetTrapVector(0x0000);
private_result = CallUniversalProc(GetPIResourceProcProcUPP,
kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(Handle)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(type)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(index))),
type,
index);
return *(((Handle*)&private_result) + RESULT_OFFSET(Handle));
}
UniversalProcPtr DeletePIResourceProcProcUPP;
pascal void DeletePIResourceProcProc(ResType type, int16 index)
{
static UniversalProcPtr* private_trapVector = nil;
if (!private_trapVector) private_trapVector = GetTrapVector(0x0000);
(void)CallUniversalProc(DeletePIResourceProcProcUPP,
kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(type)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(index))),
type,
index);
}
UniversalProcPtr AddPIResourceProcProcUPP;
pascal OSErr AddPIResourceProcProc(ResType type, Handle data)
{
#ifdef applec
#if sizeof(OSErr) > 4
#error "Result types larger than 4 bytes are not supported."
#endif
#endif
long private_result;
static UniversalProcPtr* private_trapVector = nil;
if (!private_trapVector) private_trapVector = GetTrapVector(0x0000);
private_result = CallUniversalProc(AddPIResourceProcProcUPP,
kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(type)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(data))),
type,
data);
return *(((OSErr*)&private_result) + RESULT_OFFSET(OSErr));
}
UniversalProcPtr ProcessEventProcProcUPP;
pascal void ProcessEventProcProc(void *event)
{
static UniversalProcPtr* private_trapVector = nil;
if (!private_trapVector) private_trapVector = GetTrapVector(0x0000);
(void)CallUniversalProc(ProcessEventProcProcUPP,
kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(event))),
event);
}
UniversalProcPtr DisplayPixelsProcProcUPP;
pascal OSErr DisplayPixelsProcProc(const PSPixelMap *source, const VRect *srcRect, int32 dstRow, int32 dstCol, unsigned32 platformContext)
{
#ifdef applec
#if sizeof(OSErr) > 4
#error "Result types larger than 4 bytes are not supported."
#endif
#endif
long private_result;
static UniversalProcPtr* private_trapVector = nil;
if (!private_trapVector) private_trapVector = GetTrapVector(0x0000);
private_result = CallUniversalProc(DisplayPixelsProcProcUPP,
kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(source)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(srcRect)))
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(dstRow)))
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(dstCol)))
| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(platformContext))),
source,
srcRect,
dstRow,
dstCol,
platformContext);
return *(((OSErr*)&private_result) + RESULT_OFFSET(OSErr));
}