mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 20:09:18 +02:00
+ added things
This commit is contained in:
parent
268e5d32cc
commit
ec0f1ed092
@ -22,6 +22,16 @@
|
|||||||
in MacOS Universal Headers. The prefix is to avoid name clashes
|
in MacOS Universal Headers. The prefix is to avoid name clashes
|
||||||
with FPC types.}
|
with FPC types.}
|
||||||
|
|
||||||
|
{For a future possiblity of compiling the RTL under Carbon,
|
||||||
|
sections containing Carbon only code should be under
|
||||||
|
ifdef TARGET_API_MAC_CARBON, at the moment it is always undefinded: }
|
||||||
|
|
||||||
|
{$UNDEF TARGET_API_MAC_CARBON }
|
||||||
|
|
||||||
|
{$IFDEF TARGET_API_MAC_CARBON }
|
||||||
|
{$DEFINE OPAQUE_TOOLBOX_STRUCTS }
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
{$PACKRECORDS 2} {Alignment inherited from the m68k days}
|
{$PACKRECORDS 2} {Alignment inherited from the m68k days}
|
||||||
|
|
||||||
{************** from Types.p ***************}
|
{************** from Types.p ***************}
|
||||||
@ -39,9 +49,15 @@ type
|
|||||||
UInt16 = WORD;
|
UInt16 = WORD;
|
||||||
UInt32 = LONGWORD;
|
UInt32 = LONGWORD;
|
||||||
|
|
||||||
|
IntegerPtr = ^INTEGER;
|
||||||
|
LongIntPtr = ^LONGINT;
|
||||||
|
|
||||||
OSErr = Integer;
|
OSErr = Integer;
|
||||||
OSType = Longword;
|
|
||||||
ResType = Longword;
|
FourCharCode = Longword;
|
||||||
|
|
||||||
|
OSType = FourCharCode;
|
||||||
|
ResType = FourCharCode;
|
||||||
Mac_Ptr = pointer;
|
Mac_Ptr = pointer;
|
||||||
Mac_Handle = ^Mac_Ptr;
|
Mac_Handle = ^Mac_Ptr;
|
||||||
Str31 = string[31];
|
Str31 = string[31];
|
||||||
@ -336,9 +352,92 @@ type
|
|||||||
end;
|
end;
|
||||||
FSSpecPtr = ^FSSpec;
|
FSSpecPtr = ^FSSpec;
|
||||||
|
|
||||||
|
ParmBlkPtr = ^ParamBlockRec;
|
||||||
|
|
||||||
IOCompletionUPP = UniversalProcPtr;
|
IOCompletionUPP = UniversalProcPtr;
|
||||||
|
|
||||||
|
ParamBlockRecPtr = ^ParamBlockRec;
|
||||||
|
ParamBlockRec = RECORD
|
||||||
|
qLink: QElemPtr; { queue link in header }
|
||||||
|
qType: INTEGER; { type byte for safety check }
|
||||||
|
ioTrap: INTEGER; { FS: the Trap }
|
||||||
|
ioCmdAddr: Mac_Ptr; { FS: address to dispatch to }
|
||||||
|
ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
|
||||||
|
ioResult: OSErr; { result code }
|
||||||
|
ioNamePtr: StringPtr; { ptr to Vol:FileName string }
|
||||||
|
ioVRefNum: INTEGER; { volume refnum (DrvNum for Eject and MountVol) }
|
||||||
|
CASE INTEGER OF
|
||||||
|
0: (
|
||||||
|
ioRefNum: INTEGER; { refNum for I/O operation }
|
||||||
|
ioVersNum: SInt8; { version number }
|
||||||
|
ioPermssn: SInt8; { Open: permissions (byte) }
|
||||||
|
ioMisc: Mac_Ptr; { Rename: new name (GetEOF,SetEOF: logical end of file) (Open: optional ptr to buffer) (SetFileType: new type) }
|
||||||
|
ioBuffer: Mac_Ptr; { data buffer Ptr }
|
||||||
|
ioReqCount: LONGINT; { requested byte count; also = ioNewDirID }
|
||||||
|
ioActCount: LONGINT; { actual byte count completed }
|
||||||
|
ioPosMode: INTEGER; { initial file positioning }
|
||||||
|
ioPosOffset: LONGINT; { file position offset }
|
||||||
|
);
|
||||||
|
1: (
|
||||||
|
ioFRefNum: INTEGER; { reference number }
|
||||||
|
ioFVersNum: SInt8; { version number }
|
||||||
|
filler1: SInt8;
|
||||||
|
ioFDirIndex: INTEGER; { GetFInfo directory index }
|
||||||
|
ioFlAttrib: SInt8; { GetFInfo: in-use bit=7, lock bit=0 }
|
||||||
|
ioFlVersNum: SInt8; { file version number }
|
||||||
|
ioFlFndrInfo: FInfo; { user info }
|
||||||
|
ioFlNum: UInt32; { GetFInfo: file number; TF- ioDirID }
|
||||||
|
ioFlStBlk: UInt16; { start file block (0 if none) }
|
||||||
|
ioFlLgLen: LONGINT; { logical length (EOF) }
|
||||||
|
ioFlPyLen: LONGINT; { physical length }
|
||||||
|
ioFlRStBlk: UInt16; { start block rsrc fork }
|
||||||
|
ioFlRLgLen: LONGINT; { file logical length rsrc fork }
|
||||||
|
ioFlRPyLen: LONGINT; { file physical length rsrc fork }
|
||||||
|
ioFlCrDat: UInt32; { file creation date& time (32 bits in secs) }
|
||||||
|
ioFlMdDat: UInt32; { last modified date and time }
|
||||||
|
);
|
||||||
|
2: (
|
||||||
|
filler2: LONGINT;
|
||||||
|
ioVolIndex: INTEGER; { volume index number }
|
||||||
|
ioVCrDate: UInt32; { creation date and time }
|
||||||
|
ioVLsBkUp: UInt32; { last backup date and time }
|
||||||
|
ioVAtrb: UInt16; { volume attrib }
|
||||||
|
ioVNmFls: UInt16; { number of files in directory }
|
||||||
|
ioVDirSt: UInt16; { start block of file directory }
|
||||||
|
ioVBlLn: INTEGER; { GetVolInfo: length of dir in blocks }
|
||||||
|
ioVNmAlBlks: UInt16; { for compatibilty ioVNmAlBlks * ioVAlBlkSiz <= 2 GB }
|
||||||
|
ioVAlBlkSiz: UInt32; { for compatibilty ioVAlBlkSiz is <= $0000FE00 (65,024) }
|
||||||
|
ioVClpSiz: UInt32; { GetVolInfo: bytes to allocate at a time }
|
||||||
|
ioAlBlSt: UInt16; { starting disk(512-byte) block in block map }
|
||||||
|
ioVNxtFNum: UInt32; { GetVolInfo: next free file number }
|
||||||
|
ioVFrBlk: UInt16; { GetVolInfo: # free alloc blks for this vol }
|
||||||
|
);
|
||||||
|
3: (
|
||||||
|
ioCRefNum: INTEGER; { refNum for I/O operation }
|
||||||
|
csCode: INTEGER; { word for control status code }
|
||||||
|
csParam: ARRAY [0..10] OF INTEGER; { operation-defined parameters }
|
||||||
|
);
|
||||||
|
4: (
|
||||||
|
ioSRefNum: INTEGER;
|
||||||
|
ioSVersNum: SInt8;
|
||||||
|
ioSPermssn: SInt8;
|
||||||
|
ioSMix: Mac_Ptr;
|
||||||
|
ioSFlags: INTEGER;
|
||||||
|
ioSlot: SInt8;
|
||||||
|
ioID: SInt8;
|
||||||
|
);
|
||||||
|
5: (
|
||||||
|
ioMRefNum: INTEGER;
|
||||||
|
ioMVersNum: SInt8;
|
||||||
|
ioMPermssn: SInt8;
|
||||||
|
ioMMix: Mac_Ptr;
|
||||||
|
ioMFlags: INTEGER;
|
||||||
|
ioSEBlkPtr: Mac_Ptr;
|
||||||
|
);
|
||||||
|
END;
|
||||||
|
|
||||||
CInfoPBRecPtr = ^CInfoPBRec;
|
CInfoPBRecPtr = ^CInfoPBRec;
|
||||||
|
|
||||||
CInfoPBRec = record
|
CInfoPBRec = record
|
||||||
qLink: QElemPtr;
|
qLink: QElemPtr;
|
||||||
qType: INTEGER;
|
qType: INTEGER;
|
||||||
@ -386,6 +485,36 @@ type
|
|||||||
|
|
||||||
CInfoPBPtr = ^CInfoPBRec;
|
CInfoPBPtr = ^CInfoPBRec;
|
||||||
|
|
||||||
|
DTPBRecPtr = ^DTPBRec;
|
||||||
|
DTPBRec = RECORD
|
||||||
|
qLink: QElemPtr; { queue link in header }
|
||||||
|
qType: INTEGER; { type byte for safety check }
|
||||||
|
ioTrap: INTEGER; { FS: the Trap }
|
||||||
|
ioCmdAddr: Mac_Ptr; { FS: address to dispatch to }
|
||||||
|
ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
|
||||||
|
ioResult: OSErr; { result code }
|
||||||
|
ioNamePtr: StringPtr; { ptr to Vol:FileName string }
|
||||||
|
ioVRefNum: INTEGER; { volume refnum (DrvNum for Eject and MountVol) }
|
||||||
|
ioDTRefNum: INTEGER; { desktop refnum }
|
||||||
|
ioIndex: INTEGER;
|
||||||
|
ioTagInfo: LONGINT;
|
||||||
|
ioDTBuffer: Mac_Ptr;
|
||||||
|
ioDTReqCount: LONGINT;
|
||||||
|
ioDTActCount: LONGINT;
|
||||||
|
ioFiller1: SInt8;
|
||||||
|
ioIconType: SInt8;
|
||||||
|
ioFiller2: INTEGER;
|
||||||
|
ioDirID: LONGINT;
|
||||||
|
ioFileCreator: OSType;
|
||||||
|
ioFileType: OSType;
|
||||||
|
ioFiller3: LONGINT;
|
||||||
|
ioDTLgLen: LONGINT;
|
||||||
|
ioDTPyLen: LONGINT;
|
||||||
|
ioFiller4: ARRAY [1..14] OF INTEGER;
|
||||||
|
ioAPPLParID: LONGINT;
|
||||||
|
END;
|
||||||
|
DTPBPtr = ^DTPBRec;
|
||||||
|
|
||||||
HParamBlockRecPtr = ^HParamBlockRec;
|
HParamBlockRecPtr = ^HParamBlockRec;
|
||||||
HParamBlockRec = RECORD
|
HParamBlockRec = RECORD
|
||||||
qLink: QElemPtr; { queue link in header }
|
qLink: QElemPtr; { queue link in header }
|
||||||
@ -548,6 +677,9 @@ type
|
|||||||
|
|
||||||
WDPBPtr = ^WDPBRec;
|
WDPBPtr = ^WDPBRec;
|
||||||
|
|
||||||
|
FUNCTION PBGetVInfoSync(paramBlock: ParmBlkPtr): OSErr;
|
||||||
|
external 'InterfaceLib';
|
||||||
|
|
||||||
FUNCTION GetVol(volName: StringPtr; VAR vRefNum: INTEGER): OSErr;
|
FUNCTION GetVol(volName: StringPtr; VAR vRefNum: INTEGER): OSErr;
|
||||||
external 'InterfaceLib';
|
external 'InterfaceLib';
|
||||||
|
|
||||||
@ -609,6 +741,16 @@ function FSMakeFSSpec (vRefNum: Integer; dirID: LongInt;
|
|||||||
fileName: Str255; VAR spec: FSSpec): OSErr;
|
fileName: Str255; VAR spec: FSSpec): OSErr;
|
||||||
external 'InterfaceLib';
|
external 'InterfaceLib';
|
||||||
|
|
||||||
|
FUNCTION HGetFInfo(vRefNum: INTEGER; dirID: LONGINT; fileName: Str255;
|
||||||
|
VAR fndrInfo: FInfo): OSErr;
|
||||||
|
external 'InterfaceLib';
|
||||||
|
|
||||||
|
FUNCTION PBDTGetPath(paramBlock: DTPBPtr): OSErr;
|
||||||
|
external 'InterfaceLib';
|
||||||
|
|
||||||
|
FUNCTION PBDTGetAPPLSync(paramBlock: DTPBPtr): OSErr;
|
||||||
|
external 'InterfaceLib';
|
||||||
|
|
||||||
{************** from Aliases.p ***************}
|
{************** from Aliases.p ***************}
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -661,15 +803,84 @@ CONST
|
|||||||
FUNCTION FindFolder(vRefNum: INTEGER; folderType: OSType; createFolder: BOOLEAN; VAR foundVRefNum: INTEGER; VAR foundDirID: LONGINT): OSErr;
|
FUNCTION FindFolder(vRefNum: INTEGER; folderType: OSType; createFolder: BOOLEAN; VAR foundVRefNum: INTEGER; VAR foundDirID: LONGINT): OSErr;
|
||||||
external 'InterfaceLib';
|
external 'InterfaceLib';
|
||||||
|
|
||||||
|
{************** from Events.p ***************}
|
||||||
|
|
||||||
|
TYPE
|
||||||
|
EventKind = UInt16;
|
||||||
|
EventMask = UInt16;
|
||||||
|
EventModifiers = UInt16;
|
||||||
|
|
||||||
|
TYPE
|
||||||
|
EventRecordPtr = ^EventRecord;
|
||||||
|
EventRecord = RECORD
|
||||||
|
what: EventKind;
|
||||||
|
message: UInt32;
|
||||||
|
when: UInt32;
|
||||||
|
where: Point;
|
||||||
|
modifiers: EventModifiers;
|
||||||
|
END;
|
||||||
|
|
||||||
{************** from Processes.p ***************}
|
{************** from Processes.p ***************}
|
||||||
|
|
||||||
type
|
type
|
||||||
|
ProcessSerialNumberPtr = ^ProcessSerialNumber;
|
||||||
ProcessSerialNumber = record
|
ProcessSerialNumber = record
|
||||||
highLongOfPSN: LONGINT;
|
highLongOfPSN: LONGINT;
|
||||||
lowLongOfPSN: LONGINT;
|
lowLongOfPSN: LONGINT;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ProcessSerialNumberPtr = ^ProcessSerialNumber;
|
const
|
||||||
|
{ Process identifier - Various reserved process serial numbers }
|
||||||
|
kNoProcess = 0;
|
||||||
|
kSystemProcess = 1;
|
||||||
|
kCurrentProcess = 2;
|
||||||
|
|
||||||
|
TYPE
|
||||||
|
LaunchFlags = UInt16;
|
||||||
|
|
||||||
|
CONST
|
||||||
|
launchContinue = $4000;
|
||||||
|
launchNoFileFlags = $0800;
|
||||||
|
launchUseMinimum = $0400;
|
||||||
|
launchDontSwitch = $0200;
|
||||||
|
launchAllow24Bit = $0100;
|
||||||
|
launchInhibitDaemon = $0080;
|
||||||
|
|
||||||
|
{ Format for first AppleEvent to pass to new process. The size of the overall
|
||||||
|
buffer variable: the message body immediately follows the messageLength }
|
||||||
|
|
||||||
|
TYPE
|
||||||
|
AppParametersPtr = ^AppParameters;
|
||||||
|
AppParameters = RECORD
|
||||||
|
theMsgEvent: EventRecord;
|
||||||
|
eventRefCon: UInt32;
|
||||||
|
messageLength: UInt32;
|
||||||
|
END;
|
||||||
|
|
||||||
|
{ Parameter block to _Launch }
|
||||||
|
LaunchParamBlockRecPtr = ^LaunchParamBlockRec;
|
||||||
|
LaunchParamBlockRec = RECORD
|
||||||
|
reserved1: UInt32;
|
||||||
|
reserved2: UInt16;
|
||||||
|
launchBlockID: UInt16;
|
||||||
|
launchEPBLength: UInt32;
|
||||||
|
launchFileFlags: UInt16;
|
||||||
|
launchControlFlags: LaunchFlags;
|
||||||
|
launchAppSpec: FSSpecPtr;
|
||||||
|
launchProcessSN: ProcessSerialNumber;
|
||||||
|
launchPreferredSize: UInt32;
|
||||||
|
launchMinimumSize: UInt32;
|
||||||
|
launchAvailableSize: UInt32;
|
||||||
|
launchAppParameters: AppParametersPtr;
|
||||||
|
END;
|
||||||
|
|
||||||
|
LaunchPBPtr = ^LaunchParamBlockRec;
|
||||||
|
|
||||||
|
CONST
|
||||||
|
extendedBlock = $4C43; { 'LC' }
|
||||||
|
extendedBlockLen = 32;
|
||||||
|
|
||||||
|
TYPE
|
||||||
ProcessInfoRec = record
|
ProcessInfoRec = record
|
||||||
processInfoLength: LONGINT;
|
processInfoLength: LONGINT;
|
||||||
processName: StringPtr;
|
processName: StringPtr;
|
||||||
@ -688,11 +899,8 @@ type
|
|||||||
|
|
||||||
ProcessInfoRecPtr = ^ProcessInfoRec;
|
ProcessInfoRecPtr = ^ProcessInfoRec;
|
||||||
|
|
||||||
const
|
FUNCTION LaunchApplication(LaunchParams: LaunchPBPtr): OSErr;
|
||||||
{ Process identifier - Various reserved process serial numbers }
|
external 'InterfaceLib';
|
||||||
kNoProcess = 0;
|
|
||||||
kSystemProcess = 1;
|
|
||||||
kCurrentProcess = 2;
|
|
||||||
|
|
||||||
function GetProcessInformation ({CONST} var PSN: ProcessSerialNumber;
|
function GetProcessInformation ({CONST} var PSN: ProcessSerialNumber;
|
||||||
var info: ProcessInfoRec): OSErr;
|
var info: ProcessInfoRec): OSErr;
|
||||||
@ -745,10 +953,25 @@ const
|
|||||||
badMovErr = -122; { Move into offspring error }
|
badMovErr = -122; { Move into offspring error }
|
||||||
wrgVolTypErr=-123; { Wrong volume type error [operation not supported for MFS] }
|
wrgVolTypErr=-123; { Wrong volume type error [operation not supported for MFS] }
|
||||||
volGoneErr = -124; { Server volume has been disconnected. }
|
volGoneErr = -124; { Server volume has been disconnected. }
|
||||||
|
|
||||||
|
{ Process Manager errors }
|
||||||
|
procNotFound = -600; { no eligible process with specified descriptor }
|
||||||
|
memFragErr = -601; { not enough room to launch app w/special requirements }
|
||||||
|
appModeErr = -602; { memory mode is 32-bit, but app not 32-bit clean }
|
||||||
|
protocolErr = -603; { app made module calls in improper order }
|
||||||
|
hardwareConfigErr = -604; { hardware configuration not correct for call }
|
||||||
|
appMemFullErr = -605; { application SIZE not big enough for launch }
|
||||||
|
appIsDaemon = -606; { app is BG-only, and launch flags disallow this }
|
||||||
|
bufferIsSmall = -607; { error returns from Post and Accept }
|
||||||
|
noOutstandingHLE = -608;
|
||||||
|
connectionInvalid = -609;
|
||||||
|
noUserInteractionAllowed = -610; { no user interaction allowed }
|
||||||
|
|
||||||
diffVolErr = -1303; { files on different volumes }
|
diffVolErr = -1303; { files on different volumes }
|
||||||
catChangedErr= -1304; { the catalog has been modified }
|
catChangedErr= -1304; { the catalog has been modified }
|
||||||
afpAccessDenied= -5000; { Insufficient access privileges for operation }
|
afpAccessDenied= -5000; { Insufficient access privileges for operation }
|
||||||
afpDenyConflict= -5006; { Specified open/deny modes conflict with current open modes }
|
afpDenyConflict= -5006; { Specified open/deny modes conflict with current open modes }
|
||||||
|
afpItemNotFound = -5012;{ Unknown UserName/UserID or missing comment/APPL entry }
|
||||||
afpNoMoreLocks= -5015; { Maximum lock limit reached }
|
afpNoMoreLocks= -5015; { Maximum lock limit reached }
|
||||||
afpRangeNotLocked= -5020; { Tried to unlock range that was not locked by user }
|
afpRangeNotLocked= -5020; { Tried to unlock range that was not locked by user }
|
||||||
afpRangeOverlap= -5021; { Some or all of range already locked by same user }
|
afpRangeOverlap= -5021; { Some or all of range already locked by same user }
|
||||||
@ -851,6 +1074,138 @@ TYPE
|
|||||||
|
|
||||||
QDGlobalsHdl = ^QDGlobalsPtr;
|
QDGlobalsHdl = ^QDGlobalsPtr;
|
||||||
|
|
||||||
|
{************** from AEDataModel ***************}
|
||||||
|
|
||||||
|
{ Apple event descriptor types }
|
||||||
|
|
||||||
|
CONST
|
||||||
|
typeBoolean = 'bool';
|
||||||
|
typeChar = 'TEXT';
|
||||||
|
|
||||||
|
{ Preferred numeric Apple event descriptor types }
|
||||||
|
typeSInt16 = 'shor';
|
||||||
|
typeSInt32 = 'long';
|
||||||
|
typeUInt32 = 'magn';
|
||||||
|
typeSInt64 = 'comp';
|
||||||
|
typeIEEE32BitFloatingPoint = 'sing';
|
||||||
|
typeIEEE64BitFloatingPoint = 'doub';
|
||||||
|
type128BitFloatingPoint = 'ldbl';
|
||||||
|
typeDecimalStruct = 'decm';
|
||||||
|
|
||||||
|
{ Non-preferred Apple event descriptor types }
|
||||||
|
typeSMInt = 'shor';
|
||||||
|
typeShortInteger = 'shor';
|
||||||
|
typeInteger = 'long';
|
||||||
|
typeLongInteger = 'long';
|
||||||
|
typeMagnitude = 'magn';
|
||||||
|
typeComp = 'comp';
|
||||||
|
typeSMFloat = 'sing';
|
||||||
|
typeShortFloat = 'sing';
|
||||||
|
typeFloat = 'doub';
|
||||||
|
typeLongFloat = 'doub';
|
||||||
|
typeExtended = 'exte';
|
||||||
|
typeApplSignature = 'sign';
|
||||||
|
|
||||||
|
{ Constants used creating an AppleEvent }
|
||||||
|
{ Constant for the returnID param of AECreateAppleEvent }
|
||||||
|
kAutoGenerateReturnID = -1; { AECreateAppleEvent will generate a session-unique ID }
|
||||||
|
{ Constant for transaction IDÕs }
|
||||||
|
kAnyTransactionID = 0; { no transaction is in use }
|
||||||
|
|
||||||
|
{ Apple event manager data types }
|
||||||
|
|
||||||
|
TYPE
|
||||||
|
DescType = ResType;
|
||||||
|
AEKeyword = FourCharCode;
|
||||||
|
{$IFDEF OPAQUE_TOOLBOX_STRUCTS }
|
||||||
|
AEDataStorage = ^LONGINT; { an opaque 32-bit type }
|
||||||
|
AEDataStoragePtr = ^AEDataStorage; { when a VAR xx:AEDataStorage parameter can be nil, it is changed to xx: AEDataStoragePtr }
|
||||||
|
{$ELSE}
|
||||||
|
AEDataStorage = Mac_Handle;
|
||||||
|
{$ENDIF OPAQUE_TOOLBOX_STRUCTS}
|
||||||
|
|
||||||
|
AEDescPtr = ^AEDesc;
|
||||||
|
AEDesc = RECORD
|
||||||
|
descriptorType: DescType;
|
||||||
|
dataHandle: AEDataStorage;
|
||||||
|
END;
|
||||||
|
|
||||||
|
AEKeyDescPtr = ^AEKeyDesc;
|
||||||
|
AEKeyDesc = RECORD
|
||||||
|
descKey: AEKeyword;
|
||||||
|
descContent: AEDesc;
|
||||||
|
END;
|
||||||
|
|
||||||
|
{ a list of AEDesc's is a special kind of AEDesc }
|
||||||
|
AEDescList = AEDesc;
|
||||||
|
AEDescListPtr = ^AEDescList;
|
||||||
|
{ AERecord is a list of keyworded AEDesc's }
|
||||||
|
AERecord = AEDescList;
|
||||||
|
AERecordPtr = ^AERecord;
|
||||||
|
{ an AEDesc which contains address data }
|
||||||
|
AEAddressDesc = AEDesc;
|
||||||
|
AEAddressDescPtr = ^AEAddressDesc;
|
||||||
|
{ an AERecord that contains an AppleEvent, and related data types }
|
||||||
|
AppleEvent = AERecord;
|
||||||
|
AppleEventPtr = ^AppleEvent;
|
||||||
|
AEReturnID = SInt16;
|
||||||
|
AETransactionID = SInt32;
|
||||||
|
AEEventClass = FourCharCode;
|
||||||
|
AEEventID = FourCharCode;
|
||||||
|
AEArrayType = SInt8;
|
||||||
|
|
||||||
|
TYPE
|
||||||
|
AESendPriority = SInt16;
|
||||||
|
CONST
|
||||||
|
kAENormalPriority = $00000000; { post message at the end of the event queue }
|
||||||
|
kAEHighPriority = $00000001; { post message at the front of the event queue (same as nAttnMsg) }
|
||||||
|
|
||||||
|
TYPE
|
||||||
|
AESendMode = SInt32;
|
||||||
|
|
||||||
|
CONST
|
||||||
|
kAENoReply = $00000001; { sender doesn't want a reply to event }
|
||||||
|
kAEQueueReply = $00000002; { sender wants a reply but won't wait }
|
||||||
|
kAEWaitReply = $00000003; { sender wants a reply and will wait }
|
||||||
|
kAEDontReconnect = $00000080; { don't reconnect if there is a sessClosedErr from PPCToolbox }
|
||||||
|
kAEWantReceipt = $00000200; { (nReturnReceipt) sender wants a receipt of message }
|
||||||
|
kAENeverInteract = $00000010; { server should not interact with user }
|
||||||
|
kAECanInteract = $00000020; { server may try to interact with user }
|
||||||
|
kAEAlwaysInteract = $00000030; { server should always interact with user where appropriate }
|
||||||
|
kAECanSwitchLayer = $00000040; { interaction may switch layer }
|
||||||
|
kAEDontRecord = $00001000; { don't record this event - available only in vers 1.0.1 and greater }
|
||||||
|
kAEDontExecute = $00002000; { don't send the event for recording - available only in vers 1.0.1 and greater }
|
||||||
|
kAEProcessNonReplyEvents = $00008000; { allow processing of non-reply events while awaiting synchronous AppleEvent reply }
|
||||||
|
|
||||||
|
|
||||||
|
{ Constants for timeout durations }
|
||||||
|
kAEDefaultTimeout = -1; { timeout value determined by AEM }
|
||||||
|
kNoTimeOut = -2; { wait until reply comes back, however long it takes }
|
||||||
|
|
||||||
|
|
||||||
|
FUNCTION AECreateDesc(typeCode: DescType; dataPtr: Mac_Ptr; dataSize: Size; VAR result: AEDesc): OSErr;
|
||||||
|
external 'InterfaceLib';
|
||||||
|
FUNCTION AEDisposeDesc(VAR theAEDesc: AEDesc): OSErr;
|
||||||
|
external 'InterfaceLib';
|
||||||
|
FUNCTION AEDuplicateDesc(const theAEDesc: AEDesc; VAR result: AEDesc): OSErr;
|
||||||
|
external 'InterfaceLib';
|
||||||
|
|
||||||
|
FUNCTION AECreateAppleEvent(theAEEventClass: AEEventClass; theAEEventID: AEEventID; const target: AEAddressDesc; returnID: AEReturnID; transactionID: AETransactionID; VAR result: AppleEvent): OSErr;
|
||||||
|
external 'InterfaceLib';
|
||||||
|
FUNCTION AEPutParamPtr(VAR theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; typeCode: DescType; dataPtr: Mac_Ptr; dataSize: Size): OSErr;
|
||||||
|
external 'InterfaceLib';
|
||||||
|
FUNCTION AEGetParamDesc(const theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; desiredType: DescType; VAR result: AEDesc): OSErr;
|
||||||
|
external 'InterfaceLib';
|
||||||
|
|
||||||
|
{************** from AEInteraction ***************}
|
||||||
|
|
||||||
|
type
|
||||||
|
AEIdleUPP = ^LONGINT; { an opaque UPP }
|
||||||
|
AEFilterUPP = ^LONGINT; { an opaque UPP }
|
||||||
|
|
||||||
|
FUNCTION AESend(const theAppleEvent: AppleEvent; VAR reply: AppleEvent; sendMode: AESendMode; sendPriority: AESendPriority; timeOutInTicks: LONGINT; idleProc: AEIdleUPP; filterProc: AEFilterUPP): OSErr;
|
||||||
|
external 'InterfaceLib';
|
||||||
|
|
||||||
{************** from others ***************}
|
{************** from others ***************}
|
||||||
|
|
||||||
procedure ExitToShell;
|
procedure ExitToShell;
|
||||||
@ -876,5 +1231,11 @@ FUNCTION ResolveFolderAliases (volume: INTEGER; directory: LONGINT;
|
|||||||
external 'InterfaceLib'; {??}
|
external 'InterfaceLib'; {??}
|
||||||
{ ...from CIncludes:IntEnv.h }
|
{ ...from CIncludes:IntEnv.h }
|
||||||
|
|
||||||
|
PROCEDURE InitCursorCtl(newCursors: pointer);
|
||||||
|
external 'PPCToolLib';
|
||||||
|
|
||||||
|
PROCEDURE SpinCursor(increment: INTEGER);
|
||||||
|
external 'PPCToolLib';
|
||||||
|
|
||||||
{$PACKRECORDS NORMAL}
|
{$PACKRECORDS NORMAL}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user